[WGID-265425, 265426] Add null check after g_try_new 51/141751/3
authorchleun.moon <chleun.moon@samsung.com>
Tue, 1 Aug 2017 09:11:38 +0000 (18:11 +0900)
committerchleun.moon <chleun.moon@samsung.com>
Wed, 2 Aug 2017 01:15:27 +0000 (10:15 +0900)
Change-Id: I8e51631f26ceb620ee96978e7e5a6070834cf11c
Signed-off-by: cheoleun <chleun.moon@samsung.com>
packaging/net-config.spec
src/wifi-eap.c

index b3e40578602a9aa6cb6bc701ea05b3cabe40a8c4..9eef9f57a4d45cece1324339bb16b912d10e82b2 100755 (executable)
@@ -1,6 +1,6 @@
 Name:          net-config
 Summary:       TIZEN Network Configuration service
-Version:       1.1.100
+Version:       1.1.101
 Release:       2
 Group:         System/Network
 License:       Apache-2.0
index 24dc0de0e31fc51ca0c3b595fb29d3da03f05a44..94749f1e3748183faf5dd40de3b231ac7cb8a002 100755 (executable)
@@ -118,6 +118,10 @@ void __netconfig_response_sim_authentication(TapiHandle *handle,
                wifi_authdata = __netconfig_wifi_free_wifi_authdata(wifi_authdata);
 
        wifi_authdata = g_try_new0(struct wifii_authentication_data, 1);
+       if (wifi_authdata == NULL) {
+               ERR("failed to allocate memory");
+               return;
+       }
 
        TelSimAuthenticationResponse_t *auth_resp =
                                (TelSimAuthenticationResponse_t *) data;
@@ -159,6 +163,10 @@ void __netconfig_response_aka_authentication(TapiHandle *handle,
                wifi_authdata = __netconfig_wifi_free_wifi_authdata(wifi_authdata);
 
        wifi_authdata = g_try_new0(struct wifii_authentication_data, 1);
+       if (wifi_authdata == NULL) {
+               ERR("failed to allocate memory");
+               return;
+       }
 
        TelSimAuthenticationResponse_t *auth_resp =
                                        (TelSimAuthenticationResponse_t *) data;