From: Piotr Kosko Date: Wed, 6 Dec 2017 08:57:40 +0000 (+0100) Subject: [Package] Fix SVACE issue - memory leak X-Git-Tag: submit/tizen_3.0/20171206.135657~3^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b5af23df3df83472ef48158a9e438e1666c28a7;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [Package] Fix SVACE issue - memory leak [Fix] pkg_info is now destroyed properly [Verification] TCT auto and manual 100% passrate Change-Id: I2918fd9eeb85d1ca983f0770af6371f0a1f8a16b Signed-off-by: Piotr Kosko --- diff --git a/src/package/package_instance.cc b/src/package/package_instance.cc index 0bf31f7d..d0a11470 100644 --- a/src/package/package_instance.cc +++ b/src/package/package_instance.cc @@ -359,6 +359,8 @@ void PackageInstance::PackageManagerUninstall(const picojson::value& args, picoj "any other platform error occurs")); } } else { + // pkg_info was gathered in this case, need to release memory - it is not needed + package_info_destroy(pkg_info); int request_id = 0; int ret = package_manager_request_uninstall(request_, id.c_str(), &request_id); if (ret != PACKAGE_MANAGER_ERROR_NONE) {