mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 13:18:50 +08:00
net/devif: fix null pointer reference found out by coverity
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
parent
b8ef55d201
commit
fcefd16586
1 changed files with 5 additions and 1 deletions
|
@ -150,7 +150,11 @@ int devif_file_send(FAR struct net_driver_s *dev, FAR struct file *file,
|
|||
errout:
|
||||
if (ret < 0)
|
||||
{
|
||||
netdev_iob_release(dev);
|
||||
if (dev != NULL)
|
||||
{
|
||||
netdev_iob_release(dev);
|
||||
}
|
||||
|
||||
nerr("ERROR: devif_iob_send error: %d\n", ret);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue