mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 13:52:22 +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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user