Fix set_mobile_restriction_rule_parameters 20/197220/1 accepted/tizen/unified/20190116.060539 submit/tizen/20190111.042808
authorKiseok Chang <kiso.chang@samsung.com>
Thu, 10 Jan 2019 08:02:05 +0000 (17:02 +0900)
committerKiseok Chang <kiso.chang@samsung.com>
Thu, 10 Jan 2019 08:03:30 +0000 (17:03 +0900)
- Fix the function not to free 'rule'

Change-Id: I44c5776189c8a2d049ddba9ec1cbd13711dcf3ad
Signed-off-by: Kiseok Chang <kiso.chang@samsung.com>
setting-smartmanager/smartmanager-data/src/smartmanager-utils.c

index eb941baaeb74dcefb078ec2b1f91226d59b2edff..a5e66fab742251a3652772c67a20bf3a6da9f941 100755 (executable)
@@ -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;
        }