mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 07:28:38 +08:00
drivers/loop: destroy nxmutex properly
This commit is contained in:
parent
d256b8334e
commit
40581558d3
1 changed files with 2 additions and 0 deletions
|
@ -408,6 +408,7 @@ errout_with_file:
|
|||
file_close(&dev->devfile);
|
||||
|
||||
errout_with_dev:
|
||||
nxmutex_destroy(&dev->lock);
|
||||
kmm_free(dev);
|
||||
return ret;
|
||||
}
|
||||
|
@ -471,6 +472,7 @@ int loteardown(FAR const char *devname)
|
|||
file_close(&dev->devfile);
|
||||
}
|
||||
|
||||
nxmutex_destroy(&dev->lock);
|
||||
kmm_free(dev);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue