summaryrefslogtreecommitdiff
path: root/src/iptables.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/iptables.c')
-rw-r--r--src/iptables.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/iptables.c b/src/iptables.c
index 4d46a5b9..44c5c73c 100644
--- a/src/iptables.c
+++ b/src/iptables.c
@@ -2048,10 +2048,14 @@ static void cleanup_parse_context(struct parse_context *ctx)
{
g_strfreev(ctx->argv);
g_free(ctx->ip);
- if (ctx->xt_t != NULL)
+ if (ctx->xt_t != NULL) {
g_free(ctx->xt_t->t);
- if (ctx->xt_m != NULL)
+ ctx->xt_t->t = NULL;
+ }
+ if (ctx->xt_m != NULL) {
g_free(ctx->xt_m->m);
+ ctx->xt_m->m = NULL;
+ }
g_free(ctx);
}