Fixed memory leak for gvariant 66/187966/1 accepted/tizen/unified/20180831.061848 submit/tizen/20180830.132246
authorhyunuktak <hyunuk.tak@samsung.com>
Thu, 30 Aug 2018 05:02:06 +0000 (14:02 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Thu, 30 Aug 2018 05:02:09 +0000 (14:02 +0900)
Change-Id: Ie8d798d00044862237da5d79d9f4b627dc7a934c
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
packaging/stc-iptables.spec
src/stc-iptables-util.c

index d0e3052..d0e83a6 100644 (file)
@@ -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
index 46582d2..30b1432 100755 (executable)
@@ -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__;