mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-27 08:05:27 +08:00
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: Figo.zhang <figo1802@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a5b19b635c
commit
1d0ebfe7c9
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user