mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-15 11:43:14 +08:00
fgpa_compress: dealloc responsibility to main and add missing one
This commit is contained in:
parent
eb3f5e12eb
commit
9d1aa3fb96
1 changed files with 4 additions and 3 deletions
|
@ -167,7 +167,6 @@ int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile, bool hardn
|
||||||
fclose(infile[j]);
|
fclose(infile[j]);
|
||||||
}
|
}
|
||||||
fclose(outfile);
|
fclose(outfile);
|
||||||
free(infile);
|
|
||||||
free(fpga_config);
|
free(fpga_config);
|
||||||
return (EXIT_FAILURE);
|
return (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
@ -182,7 +181,6 @@ int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile, bool hardn
|
||||||
fclose(infile[j]);
|
fclose(infile[j]);
|
||||||
}
|
}
|
||||||
fclose(outfile);
|
fclose(outfile);
|
||||||
free(infile);
|
|
||||||
free(fpga_config);
|
free(fpga_config);
|
||||||
|
|
||||||
return (EXIT_SUCCESS);
|
return (EXIT_SUCCESS);
|
||||||
|
@ -478,7 +476,10 @@ int main(int argc, char **argv) {
|
||||||
return (EXIT_FAILURE);
|
return (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return zlib_compress(infiles, num_input_files, outfile, hardnested_mode);
|
int ret = zlib_compress(infiles, num_input_files, outfile, hardnested_mode);
|
||||||
|
free(infile_names);
|
||||||
|
free(infiles);
|
||||||
|
return (ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue