From: chleun.moon Date: Tue, 1 Aug 2017 09:11:38 +0000 (+0900) Subject: [WGID-265425, 265426] Add null check after g_try_new X-Git-Tag: submit/tizen_3.0/20170802.052417~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=083bf42c2c79b85565670c0f46a6ae035096cba4;p=platform%2Fcore%2Fconnectivity%2Fnet-config.git [WGID-265425, 265426] Add null check after g_try_new Change-Id: I8e51631f26ceb620ee96978e7e5a6070834cf11c Signed-off-by: cheoleun --- diff --git a/packaging/net-config.spec b/packaging/net-config.spec index b3e4057..9eef9f5 100755 --- a/packaging/net-config.spec +++ b/packaging/net-config.spec @@ -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 diff --git a/src/wifi-eap.c b/src/wifi-eap.c index 24dc0de..94749f1 100755 --- a/src/wifi-eap.c +++ b/src/wifi-eap.c @@ -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;