From: hyunuktak Date: Thu, 30 Aug 2018 05:02:06 +0000 (+0900) Subject: Fixed memory leak for gvariant X-Git-Tag: submit/tizen/20180830.132246^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e01fda45e21079590a69f1d6bd6cbd1b78c514e;p=platform%2Fcore%2Fconnectivity%2Fstc-iptables.git Fixed memory leak for gvariant Change-Id: Ie8d798d00044862237da5d79d9f4b627dc7a934c Signed-off-by: hyunuktak --- diff --git a/packaging/stc-iptables.spec b/packaging/stc-iptables.spec index d0e3052..d0e83a6 100644 --- a/packaging/stc-iptables.spec +++ b/packaging/stc-iptables.spec @@ -1,6 +1,6 @@ Name: stc-iptables Summary: STC(Smart Traffic Control) iptables -Version: 0.0.19 +Version: 0.0.20 Release: 0 Group: Network & Connectivity/Other License: GPL-2.0 and Apache-2.0 @@ -65,7 +65,7 @@ cp resources/dbus/stc-iptables.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/s mkdir -p /opt/usr/data/network chmod 755 /opt/usr/data/network chown network_fw:network_fw /opt/usr/data/network -/usr/sbin/setcap cap_net_bind_service,cap_net_raw,cap_net_admin=ei %{_bindir}/stc-iptables +#/usr/sbin/setcap cap_net_bind_service,cap_net_raw,cap_net_admin=ei %{_bindir}/stc-iptables %files %manifest %{name}.manifest diff --git a/src/stc-iptables-util.c b/src/stc-iptables-util.c index 46582d2..30b1432 100755 --- a/src/stc-iptables-util.c +++ b/src/stc-iptables-util.c @@ -477,6 +477,7 @@ gboolean handle_iptables_add_rule(StcRule *object, rule->nfacct_name, rule->target); __free_rule(rule); + g_variant_iter_free(iter); STC_IPTABLES_DBUS_REPLY_ERROR(invocation, ret); __STC_LOG_FUNC_EXIT__; @@ -534,6 +535,7 @@ gboolean handle_iptables_insert_rule(StcRule *object, rule->nfacct_name, rule->target); __free_rule(rule); + g_variant_iter_free(iter); STC_IPTABLES_DBUS_REPLY_ERROR(invocation, ret); __STC_LOG_FUNC_EXIT__; @@ -590,6 +592,7 @@ gboolean handle_iptables_remove_rule(StcRule *object, rule->nfacct_name, rule->target); __free_rule(rule); + g_variant_iter_free(iter); STC_IPTABLES_DBUS_REPLY_ERROR(invocation, ret); __STC_LOG_FUNC_EXIT__; @@ -722,6 +725,7 @@ gboolean handle_ip6tables_add_rule(StcRule *object, rule->nfacct_name, rule->target); __free_6_rule(rule); + g_variant_iter_free(iter); STC_IPTABLES_DBUS_REPLY_ERROR(invocation, ret); __STC_LOG_FUNC_EXIT__; @@ -779,6 +783,7 @@ gboolean handle_ip6tables_insert_rule(StcRule *object, rule->nfacct_name, rule->target); __free_6_rule(rule); + g_variant_iter_free(iter); STC_IPTABLES_DBUS_REPLY_ERROR(invocation, ret); __STC_LOG_FUNC_EXIT__; @@ -835,6 +840,7 @@ gboolean handle_ip6tables_remove_rule(StcRule *object, rule->nfacct_name, rule->target); __free_6_rule(rule); + g_variant_iter_free(iter); STC_IPTABLES_DBUS_REPLY_ERROR(invocation, ret); __STC_LOG_FUNC_EXIT__;