mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 05:55:46 +08:00
arch/stm32/1wire: Don't free the context if the reference doesn't equal zero
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
0740ebb21b
commit
93fe5a3d0d
@@ -1273,7 +1273,6 @@ int stm32_1wireuninitialize(struct onewire_dev_s *dev)
|
|||||||
if (--priv->refs)
|
if (--priv->refs)
|
||||||
{
|
{
|
||||||
nxmutex_unlock(&priv->lock);
|
nxmutex_unlock(&priv->lock);
|
||||||
kmm_free(priv);
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user