Commit 1d0ebfe7 authored by Figo.zhang's avatar Figo.zhang Committed by David S. Miller

net pkgen.c:fix no need for check

vfree() does its own 'NULL' check, so no need for check before
calling it.
Signed-off-by: default avatarFigo.zhang <figo1802@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a5b19b63
......@@ -3691,8 +3691,7 @@ out1:
#ifdef CONFIG_XFRM
free_SAs(pkt_dev);
#endif
if (pkt_dev->flows)
vfree(pkt_dev->flows);
vfree(pkt_dev->flows);
kfree(pkt_dev);
return err;
}
......@@ -3791,8 +3790,7 @@ static int pktgen_remove_device(struct pktgen_thread *t,
#ifdef CONFIG_XFRM
free_SAs(pkt_dev);
#endif
if (pkt_dev->flows)
vfree(pkt_dev->flows);
vfree(pkt_dev->flows);
kfree(pkt_dev);
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