mirror of
https://github.com/facebook/zstd.git
synced 2025-08-05 19:15:58 +03:00
adding fclose before return
This commit is contained in:
@@ -105,6 +105,7 @@ static char* readFile(const char* filename, size_t* size) {
|
|||||||
bytes_read = fread(buf, 1, *size, f);
|
bytes_read = fread(buf, 1, *size, f);
|
||||||
if (bytes_read != *size) {
|
if (bytes_read != *size) {
|
||||||
fprintf(stderr, "failed to read whole file\n");
|
fprintf(stderr, "failed to read whole file\n");
|
||||||
|
fclose(f);
|
||||||
free(buf);
|
free(buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user