switch (entry_test->type) {
case AF_INET:
- if (!entry_test->entry)
+ if (!entry_test->entry) {
+#if defined TIZEN_EXT
+ iptables_entry_free(entry_test);
+#endif
return NULL;
+ }
break;
case AF_INET6:
- if (!entry_test->entry6)
+ if (!entry_test->entry6) {
+#if defined TIZEN_EXT
+ iptables_entry_free(entry_test);
+#endif
return NULL;
+ }
break;
default:
+#if defined TIZEN_EXT
+ iptables_entry_free(entry_test);
+#endif
return NULL;
}
DBG("%d %s", type, table_name);
- if (setup_xtables(type))
+ if (setup_xtables(type)) {
+#if defined TIZEN_EXT
+ g_free(iptables_mod);
+ g_free(module);
+#endif
return NULL;
+ }
if (xtables_insmod(iptables_mod, NULL, TRUE) != 0)
DBG("%s module loading gives error but trying anyway",