mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
mem leaks
This commit is contained in:
parent
35592b979d
commit
fd198b0048
1 changed files with 6 additions and 1 deletions
|
@ -458,16 +458,21 @@ int main(int argc, char **argv) {
|
||||||
if (infiles[i] == NULL) {
|
if (infiles[i] == NULL) {
|
||||||
fprintf(stderr, "Error. Cannot open input file %s\n\n", infile_names[i]);
|
fprintf(stderr, "Error. Cannot open input file %s\n\n", infile_names[i]);
|
||||||
free(infile_names);
|
free(infile_names);
|
||||||
|
free(infiles);
|
||||||
return (EXIT_FAILURE);
|
return (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outfile = fopen(argv[argc - 1], "wb");
|
outfile = fopen(argv[argc - 1], "wb");
|
||||||
if (outfile == NULL) {
|
if (outfile == NULL) {
|
||||||
fprintf(stderr, "Error. Cannot open output file %s\n\n", argv[argc - 1]);
|
fprintf(stderr, "Error. Cannot open output file %s\n\n", argv[argc - 1]);
|
||||||
|
free(infile_names);
|
||||||
|
free(infiles);
|
||||||
return (EXIT_FAILURE);
|
return (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
if (generate_version_file) {
|
if (generate_version_file) {
|
||||||
if (generate_fpga_version_info(infiles, infile_names, num_input_files, outfile)) {
|
if (generate_fpga_version_info(infiles, infile_names, num_input_files, outfile)) {
|
||||||
|
free(infile_names);
|
||||||
|
free(infiles);
|
||||||
return (EXIT_FAILURE);
|
return (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue