Commit 4f3626f9 authored by Dan McGee's avatar Dan McGee Committed by Stephen Hemminger

xt: only unset fields if m is non NULL

parent 9a230771
......@@ -252,13 +252,15 @@ static int parse_ipt(struct action_util *a,int *argc_p,
optind = 0;
xtables_free_opts(1);
/* Clear flags if target will be used again */
m->tflags=0;
m->used=0;
/* Free allocated memory */
if (m->t)
free(m->t);
if (m) {
/* Clear flags if target will be used again */
m->tflags = 0;
m->used = 0;
/* Free allocated memory */
if (m->t)
free(m->t);
}
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment