Skip to content

Commit 97b0b80

Browse files
committed
Update xtoptions.c
1 parent cfde871 commit 97b0b80

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ipthelper/xtoptions.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ xtables_options_xfrm(struct option *orig_opts, struct option *oldopts,
120120
memcpy(mp, oldopts, sizeof(*mp) * num_old);
121121
mp += num_old;
122122
}
123-
xtables_free_opts(0);
123+
if (xt_params->opts != NULL && xt_params->opts != xt_params->orig_opts)
124+
xtables_free_opts(0);
124125

125126
/* Clear trailing entry */
126127
memset(mp, 0, sizeof(*mp));

0 commit comments

Comments
 (0)