mirror of https://github.com/ecmwf/eccodes.git
The keys iterator delete function should free the strings
This commit is contained in:
parent
c5b15632e7
commit
804e9ac571
|
@ -75,7 +75,7 @@ int main(int argc,char* argv[])
|
||||||
/* loop over the keys */
|
/* loop over the keys */
|
||||||
while(codes_bufr_keys_iterator_next(kiter))
|
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);
|
char* name = codes_bufr_keys_iterator_get_name(kiter);
|
||||||
printf(" %s=",name);
|
printf(" %s=",name);
|
||||||
|
|
||||||
|
@ -96,7 +96,6 @@ int main(int argc,char* argv[])
|
||||||
/* for arrays */
|
/* for arrays */
|
||||||
printf("(array of %ld)\n",klen);
|
printf("(array of %ld)\n",klen);
|
||||||
}
|
}
|
||||||
free(name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* delete key iterator */
|
/* delete key iterator */
|
||||||
|
|
Loading…
Reference in New Issue