Merge "bootable/recovery: cleanup compiler warnings (potential leak of memory)"

This commit is contained in:
Tao Bao
2017-02-01 05:10:14 +00:00
committed by Gerrit Code Review
+1
View File
@@ -198,6 +198,7 @@ unsigned char* ReadZip(const char* filename,
if (fread(img, 1, sz, f) != sz) { if (fread(img, 1, sz, f) != sz) {
printf("failed to read \"%s\" %s\n", filename, strerror(errno)); printf("failed to read \"%s\" %s\n", filename, strerror(errno));
fclose(f); fclose(f);
free(img);
return NULL; return NULL;
} }
fclose(f); fclose(f);