mirror of
https://github.com/facebook/zstd.git
synced 2025-07-30 22:23:13 +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);
|
||||
if (bytes_read != *size) {
|
||||
fprintf(stderr, "failed to read whole file\n");
|
||||
fclose(f);
|
||||
free(buf);
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user