From 804e9ac571b14a905243c6ab8a0ae9555e8291f8 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 2 Feb 2017 18:41:42 +0000 Subject: [PATCH] The keys iterator delete function should free the strings --- examples/C/bufr_keys_iterator.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/C/bufr_keys_iterator.c b/examples/C/bufr_keys_iterator.c index 2b010c032..f9fd5be5c 100644 --- a/examples/C/bufr_keys_iterator.c +++ b/examples/C/bufr_keys_iterator.c @@ -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 */