summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ideviceinstaller.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c
index d13fdb9..86c6fe7 100644
--- a/src/ideviceinstaller.c
+++ b/src/ideviceinstaller.c
@@ -520,13 +520,12 @@ run_again:
/* extract iTunesMetadata.plist from package */
char *zbuf = NULL;
uint32_t len = 0;
- if (zip_f_get_contents(zf, "iTunesMetadata.plist", 0, &zbuf, &len) < 0) {
- zip_unchange_all(zf);
- zip_close(zf);
- goto leave_cleanup;
+ if (zip_f_get_contents(zf, "iTunesMetadata.plist", 0, &zbuf, &len) == 0) {
+ meta = plist_new_data(zbuf, len);
+ }
+ if (zbuf) {
+ free(zbuf);
}
- meta = plist_new_data(zbuf, len);
- free(zbuf);
/* we need to get the CFBundleName first */
plist_t info = NULL;