fgpa_compress: dealloc responsibility to main and add missing one
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user