summaryrefslogtreecommitdiffstats
path: root/verifier.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-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;