commit | a7feeb4dce1a1ab6fe1cca783c967dd80c2a7aee | [log] [tgz] |
---|---|---|
author | Tao Bao <tbao@google.com> | Thu Dec 01 16:52:12 2016 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Thu Dec 01 16:52:12 2016 +0000 |
tree | b615e12a5a9fea069b7c47f245da8ae4f0e06195 | |
parent | 449467393af6a44fa1fff7039afb1d5ff7dbd0f9 [diff] | |
parent | d0de070a390d4825cbbb6eeed5433720045f26eb [diff] |
Merge "updater: Fix inconsistent code."
diff --git a/applypatch/imgdiff.cpp b/applypatch/imgdiff.cpp index f6087de..4dc4810 100644 --- a/applypatch/imgdiff.cpp +++ b/applypatch/imgdiff.cpp
@@ -224,6 +224,7 @@ 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 @@ } } + free(patch_data); + free(patch_size); + fclose(f); return 0;