X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/43d3f76921db4456cb18f6df8d5f1dcf1cb0dc0e..639a571810b8ebc72f08c27c39faf05419124c34:/client/fpga_compress.c diff --git a/client/fpga_compress.c b/client/fpga_compress.c index 3d5ba7ca..9bafead9 100644 --- a/client/fpga_compress.c +++ b/client/fpga_compress.c @@ -91,6 +91,7 @@ int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile) for(uint16_t j = 0; j < num_infiles; j++) { fclose(infile[j]); } + free(fpga_config); return(EXIT_FAILURE); } @@ -138,7 +139,7 @@ int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile) ret = deflate(&compressed_fpga_stream, Z_FINISH); } - fprintf(stderr, "compressed %lu input bytes to %u output bytes\n", i, compressed_fpga_stream.total_out); + fprintf(stderr, "compressed %u input bytes to %lu output bytes\n", i, compressed_fpga_stream.total_out); if (ret != Z_STREAM_END) { fprintf(stderr, "Error in deflate(): %d %s\n", ret, compressed_fpga_stream.msg); @@ -195,7 +196,7 @@ int zlib_decompress(FILE *infile, FILE *outfile) compressed_fpga_stream.next_in = inbuf; uint16_t i = 0; do { - uint8_t c = fgetc(infile); + int c = fgetc(infile); if (!feof(infile)) { inbuf[i++] = c; compressed_fpga_stream.avail_in++;