Examples: Fix memory leaks

This commit is contained in:
Shahram Najm 2020-02-06 11:08:28 +00:00
parent efdbd08c66
commit 4146ee6b09
2 changed files with 7 additions and 0 deletions

View File

@ -122,6 +122,8 @@ int main(int argc, char** argv)
fclose(in);
fclose(out);
free(values1);
free(values2);
return 0;
}

View File

@ -110,5 +110,10 @@ int main(int argc, char** argv)
if (set) codes_fieldset_delete(set);
for (i = 0; i < nfiles; ++i) {
free(filenames[i]);
}
free(filenames);
return 0;
}