From: Nishant Chaprana Date: Tue, 13 Jun 2017 03:06:18 +0000 (+0530) Subject: [Fix Crash] g_free crash issue __test_stc_restriction_info_cb. X-Git-Tag: submit/tizen/20170620.103311~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d3e5ec73a5a4c15158a7ee83e7d208bb0e807f7d;p=platform%2Fcore%2Fapi%2Fsmart-traffic-control.git [Fix Crash] g_free crash issue __test_stc_restriction_info_cb. Description: This crash occured due to garbage value initialization in app_id, iface_name, imsi due to which g_free was crashing. Change-Id: Ic6d1c9ee361968eeefe7344fa0d9ee8c8e819649 Signed-off-by: Nishant Chaprana --- diff --git a/packaging/capi-network-stc.spec b/packaging/capi-network-stc.spec index f02b585..db48f25 100755 --- a/packaging/capi-network-stc.spec +++ b/packaging/capi-network-stc.spec @@ -1,6 +1,6 @@ Name: capi-network-stc Summary: A Smart Traffic Control (STC) libraries in Native API -Version: 0.0.10 +Version: 0.0.11 Release: 1 Group: Network & Connectivity/API License: Apache-2.0 diff --git a/test/restriction.c b/test/restriction.c index dc57f24..a5c0951 100755 --- a/test/restriction.c +++ b/test/restriction.c @@ -65,9 +65,9 @@ static stc_callback_ret_e __test_stc_restriction_info_cb( } int ret = STC_ERROR_NONE; - char *app_id; - char *iface_name; - char *imsi; + char *app_id = NULL; + char *iface_name = NULL; + char *imsi = NULL; stc_restriction_status_e rst_status; stc_iface_type_e iface_type; int64_t rx_limit;