From 58fbc88eb8ba097c9352fd88858786e1e44ce0f7 Mon Sep 17 00:00:00 2001 From: Anna Niznik Date: Tue, 7 Jul 2015 16:05:11 +0200 Subject: [PATCH] nullptr initialization in security_registration The pointer was not initialized, so it had random value. Change-Id: I57e2fa2c176ff208682e5f41bf135c6c25ff4dde --- src/common/security_registration.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/security_registration.cc b/src/common/security_registration.cc index a00463f..054b1bd 100644 --- a/src/common/security_registration.cc +++ b/src/common/security_registration.cc @@ -45,7 +45,7 @@ bool PrepareRequest(const std::string& app_id, const std::string& pkg_id, privileges_x *privileges = nullptr; PKGMGR_LIST_MOVE_NODE_TO_HEAD(manifest->privileges, privileges); for (; privileges != nullptr; privileges = privileges->next) { - privilege_x* priv; + privilege_x* priv = nullptr; PKGMGR_LIST_MOVE_NODE_TO_HEAD(privileges->privilege, priv); for (; priv != nullptr; priv = priv->next) { security_manager_app_inst_req_add_privilege(req, priv->text); -- 2.7.4