From: Bimba Shrestha Date: Fri, 3 Apr 2020 20:31:47 +0000 (-0700) Subject: adding fclose before return X-Git-Tag: v1.4.5^2~69^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d598c88fb3ff590c14ce7dd62d9bbb90e672213c;p=thirdparty%2Fzstd.git adding fclose before return --- diff --git a/contrib/diagnose_corruption/check_flipped_bits.c b/contrib/diagnose_corruption/check_flipped_bits.c index 78473ea59..ed3db57de 100644 --- a/contrib/diagnose_corruption/check_flipped_bits.c +++ b/contrib/diagnose_corruption/check_flipped_bits.c @@ -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; }