From: Kiseok Chang Date: Thu, 10 Jan 2019 08:02:05 +0000 (+0900) Subject: Fix set_mobile_restriction_rule_parameters X-Git-Tag: submit/tizen/20190111.042808^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b5e3c6d3176e2fdbb4916388e1614e80c32720ff;p=profile%2Fmobile%2Fapps%2Fnative%2Fsettings.git Fix set_mobile_restriction_rule_parameters - Fix the function not to free 'rule' Change-Id: I44c5776189c8a2d049ddba9ec1cbd13711dcf3ad Signed-off-by: Kiseok Chang --- diff --git a/setting-smartmanager/smartmanager-data/src/smartmanager-utils.c b/setting-smartmanager/smartmanager-data/src/smartmanager-utils.c index eb941baa..a5e66fab 100755 --- a/setting-smartmanager/smartmanager-data/src/smartmanager-utils.c +++ b/setting-smartmanager/smartmanager-data/src/smartmanager-utils.c @@ -357,7 +357,6 @@ restrictions_result set_mobile_restriction_rule_parameters( ret = stc_restriction_rule_set_app_id(rule, "TOTAL_DATACALL"); if (STC_ERROR_NONE != ret) { - stc_restriction_rule_destroy(rule); SETTING_TRACE_ERROR("stc_restriction_rule_set_app_id() error: %s", get_error_message(ret)); return RESTRICTIONS_ERROR; @@ -365,7 +364,6 @@ restrictions_result set_mobile_restriction_rule_parameters( ret = stc_restriction_rule_set_iface_type(rule, STC_IFACE_DATACALL); if (STC_ERROR_NONE != ret) { - stc_restriction_rule_destroy(rule); SETTING_TRACE_ERROR("stc_restriction_rule_set_iface_type() error: %s", get_error_message(ret)); return RESTRICTIONS_ERROR; @@ -373,7 +371,6 @@ restrictions_result set_mobile_restriction_rule_parameters( ret = stc_restriction_rule_set_subscriber_id(rule, subscriber_id); if (STC_ERROR_NONE != ret) { - stc_restriction_rule_destroy(rule); SETTING_TRACE_ERROR("stc_restriction_rule_set_subscriber_id() error:"\ "%s", get_error_message(ret)); @@ -382,7 +379,6 @@ restrictions_result set_mobile_restriction_rule_parameters( ret = stc_restriction_rule_set_limit(rule, limit); if (STC_ERROR_NONE != ret) { - stc_restriction_rule_destroy(rule); SETTING_TRACE_ERROR("stc_restriction_rule_set_limit() error: %s", get_error_message(ret)); return RESTRICTIONS_ERROR; @@ -390,7 +386,6 @@ restrictions_result set_mobile_restriction_rule_parameters( ret = stc_restriction_rule_set_warning_limit(rule, warning_limit); if (STC_ERROR_NONE != ret) { - stc_restriction_rule_destroy(rule); SETTING_TRACE_ERROR( "stc_restriction_rule_set_warning_limit() error: %s", get_error_message(ret)); @@ -419,7 +414,7 @@ restrictions_result set_mobile_limit_restrictions(stc_h stc_handle, result = set_mobile_restriction_rule_parameters(rule, subscriber_id, limit, warning_limit); if (RESTRICTIONS_OK != result) { - SETTING_TRACE_ERROR("set_restriction_rule_parameters() error"); + SETTING_TRACE_ERROR("set_mobile_restriction_rule_parameters() error"); stc_restriction_rule_destroy(rule); return result; }