mirror of https://github.com/ecmwf/eccodes.git
Examples: Fix memory leaks
This commit is contained in:
parent
efdbd08c66
commit
4146ee6b09
|
@ -122,6 +122,8 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
fclose(in);
|
fclose(in);
|
||||||
fclose(out);
|
fclose(out);
|
||||||
|
free(values1);
|
||||||
|
free(values2);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,5 +110,10 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
if (set) codes_fieldset_delete(set);
|
if (set) codes_fieldset_delete(set);
|
||||||
|
|
||||||
|
for (i = 0; i < nfiles; ++i) {
|
||||||
|
free(filenames[i]);
|
||||||
|
}
|
||||||
|
free(filenames);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue