summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xtables.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xtables.c b/xtables.c
index 00362992..be103d75 100644
--- a/xtables.c
+++ b/xtables.c
@@ -75,8 +75,10 @@ void basic_exit_err(enum xtables_exittype status, const char *msg, ...)
void xtables_free_opts(int unused)
{
- if (xt_params->opts != xt_params->orig_opts)
+ if (xt_params->opts != xt_params->orig_opts) {
free(xt_params->opts);
+ xt_params->opts = NULL;
+ }
}
struct option *xtables_merge_options(struct option *orig_opts,