xt: only unset fields if m is non NULL
This commit is contained in:
parent
9a230771c0
commit
4f3626f920
14
tc/m_xt.c
14
tc/m_xt.c
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue