[SVACE][Tizen_3.0_Mobile] Fix MEMORY_LEAK 97/65097/1 accepted/tizen/common/20160407.133106 accepted/tizen/ivi/20160407.112135 accepted/tizen/mobile/20160407.112110 accepted/tizen/tv/20160407.112108 accepted/tizen/wearable/20160407.112118 submit/tizen/20160407.080740
authorSeonah Moon <seonah1.moon@samsung.com>
Thu, 7 Apr 2016 07:59:41 +0000 (16:59 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Thu, 7 Apr 2016 07:59:55 +0000 (16:59 +0900)
Change-Id: I3afc67996765c259c3a851a4d50c2ad82a4b07db
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
packaging/mobileap-agent.spec
src/mobileap_wifi.c

index 08c693a..a8a1b1d 100644 (file)
@@ -1,6 +1,6 @@
 Name:          mobileap-agent
 Summary:       Mobile AP daemon for setting tethering environments
-Version:       1.0.50
+Version:       1.0.51
 Release:       1
 Group:         System/Network
 License:       Apache-2.0
index 4f64836..f6708f7 100755 (executable)
@@ -429,9 +429,16 @@ int _register_app_for_wifi_passphrase(const char *pkg_id)
        alias = __get_key_manager_alias(MOBILE_AP_WIFI_PASSPHRASE_STORE_KEY);
        if (ckmc_set_permission(alias, pkg_id, CKMC_PERMISSION_REMOVE) != CKMC_ERROR_NONE) {
                ERR("Fail to set permission for Wi-Fi passphrase (%d)");
+
+               if (alias)
+                       free(alias);
+
                return MOBILE_AP_ERROR_NOT_PERMITTED;
        }
 
+       if (alias)
+               free(alias);
+
        return MOBILE_AP_ERROR_NONE;
 
 }