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

This commit is contained in:
Tao Bao
2016-11-30 21:19:41 +00:00
committed by Gerrit Code Review

View File

@@ -224,6 +224,7 @@ unsigned char* ReadZip(const char* filename,
for (i = 0; i < cdcount; ++i) {
if (!(cd[0] == 0x50 && cd[1] == 0x4b && cd[2] == 0x01 && cd[3] == 0x02)) {
printf("bad central directory entry %d\n", i);
free(temp_entries);
return NULL;
}
@@ -1062,6 +1063,9 @@ int main(int argc, char** argv) {
}
}
free(patch_data);
free(patch_size);
fclose(f);
return 0;