setting_view_create(ad->pkginfo_view, ad);
setting_view_node_set_cur_view(ad->pkginfo_view);
+
+ package_info_destroy(package_info);
+
} else {
setting_view_node_table_register(&setting_view_appmgr_main,
NULL);
if (unzLocateFile(uf, fileInZip, 1)) { // try to locate file inside zip
// second argument of unzLocateFile: 1 = case sensitive, 0 = case-insensitive
SETTING_TRACE("File %s not found in %s", fileInZip, zipFile);
+ unzCloseCurrentFile(uf); // close the zipfile
return -1;
} // file inside zip found
if (unzGetCurrentFileInfo(uf, &file_info, filename_inzip, sizeof(filename_inzip), NULL, 0, NULL, 0)) {
SETTING_TRACE("Error %d with zipfile %s in unzGetCurrentFileInfo.", err, zipFile);
+ unzCloseCurrentFile(uf); // close the zipfile
return -1;
} // obtained the necessary details about file inside zip
buf = (void*)malloc(size_buf); // setup buffer
if (buf == NULL) {
SETTING_TRACE("Error allocating memory for read buffer");
+ unzCloseCurrentFile(uf); // close the zipfile
return -1;
} // buffer ready
if (err != UNZ_OK) {
SETTING_TRACE("Error %d with zipfile %s in unzOpenCurrentFilePassword.", err, zipFile);
free(buf);
+ unzCloseCurrentFile(uf); // close the zipfile
return -1;
} // file inside the zip is open
if (tempfile_fp == NULL) {
SETTING_TRACE("Error to write tempfile : %s", tempfilename);
free(buf);
+ unzCloseCurrentFile(uf); // close the zipfile
return -1;
} // open temp file