summaryrefslogtreecommitdiffstats
path: root/verifier.c
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-18 03:03:49 +0100
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-18 03:03:49 +0100
commitff3d93821e22588ce607c17252334ca2d9ca54a4 (patch)
treee806acbb6f71dbdafc09df3bc0d8a0a4ae1b7905 /verifier.c
parentInitial Contribution (diff)
downloadandroid_bootable_recovery-ff3d93821e22588ce607c17252334ca2d9ca54a4.tar
android_bootable_recovery-ff3d93821e22588ce607c17252334ca2d9ca54a4.tar.gz
android_bootable_recovery-ff3d93821e22588ce607c17252334ca2d9ca54a4.tar.bz2
android_bootable_recovery-ff3d93821e22588ce607c17252334ca2d9ca54a4.tar.lz
android_bootable_recovery-ff3d93821e22588ce607c17252334ca2d9ca54a4.tar.xz
android_bootable_recovery-ff3d93821e22588ce607c17252334ca2d9ca54a4.tar.zst
android_bootable_recovery-ff3d93821e22588ce607c17252334ca2d9ca54a4.zip
Diffstat (limited to 'verifier.c')
-rw-r--r--verifier.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/verifier.c b/verifier.c
index 67a4f390a..1180ae8d0 100644
--- a/verifier.c
+++ b/verifier.c
@@ -126,13 +126,15 @@ static const ZipEntry *verifySignature(const ZipArchive *pArchive,
strncpy(sfName, rsaName.str, rsaName.len - sizeof(rsa) + 1);
strcpy(sfName + rsaName.len - sizeof(rsa) + 1, sf);
const ZipEntry *sfEntry = mzFindZipEntry(pArchive, sfName);
- free(sfName);
if (sfEntry == NULL) {
LOGW("Missing signature file %s\n", sfName);
+ free(sfName);
continue;
}
+ free(sfName);
+
uint8_t sfDigest[SHA_DIGEST_SIZE];
if (!digestEntry(pArchive, sfEntry, NULL, 0, sfDigest)) continue;