The keys iterator delete function should free the strings

This commit is contained in:
Shahram Najm 2017-02-02 18:41:42 +00:00
parent c5b15632e7
commit 804e9ac571
1 changed files with 1 additions and 2 deletions

View File

@ -75,7 +75,7 @@ int main(int argc,char* argv[])
/* loop over the keys */
while(codes_bufr_keys_iterator_next(kiter))
{
/* get key name. This needs to be free'd later */
/* get key name */
char* name = codes_bufr_keys_iterator_get_name(kiter);
printf(" %s=",name);
@ -96,7 +96,6 @@ int main(int argc,char* argv[])
/* for arrays */
printf("(array of %ld)\n",klen);
}
free(name);
}
/* delete key iterator */