From: Tomasz Iwanek Date: Fri, 11 Mar 2016 14:52:20 +0000 (+0100) Subject: Fix formatting/double free() X-Git-Tag: accepted/tizen/common/20160316.161035~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9eca4ede3d6a67ae610eaf88e946fc1128a32bc0;p=platform%2Fcore%2Fappfw%2Fapp-installers.git Fix formatting/double free() manifest->tep_name is freed in pkgmgr. Change-Id: Ic6720169d01262fb0089a90759d072d448af9bbc --- diff --git a/src/common/step/step_parse_manifest.cc b/src/common/step/step_parse_manifest.cc index acab4a5..2cb8e09 100644 --- a/src/common/step/step_parse_manifest.cc +++ b/src/common/step/step_parse_manifest.cc @@ -806,7 +806,7 @@ Step::Status StepParseManifest::process() { } if (!context_->tep_path.get().empty()) - manifest->tep_name = (char *)context_->tep_path.get().c_str(); + manifest->tep_name = strdup(context_->tep_path.get().c_str()); // write pkgid for recovery file if (context_->recovery_info.get().recovery_file) { diff --git a/src/common/utils/base64.cc b/src/common/utils/base64.cc index 1e1f08d..840f506 100644 --- a/src/common/utils/base64.cc +++ b/src/common/utils/base64.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include