You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/11/14 12:36:36 UTC
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7592: arch/stm32/1wire: Don't free the context if the reference doesn't equal zero
xiaoxiang781216 commented on code in PR #7592:
URL: https://github.com/apache/incubator-nuttx/pull/7592#discussion_r1021473280
##########
arch/arm/src/stm32/stm32_1wire.c:
##########
@@ -1273,7 +1273,6 @@ int stm32_1wireuninitialize(struct onewire_dev_s *dev)
if (--priv->refs)
{
nxmutex_unlock(&priv->lock);
- kmm_free(priv);
Review Comment:
call stm32_1wireuninitialize with refs equal zeros is a fatal error, nxmutex_lock just make the thing more worse:
1. Modify the memory owned by other or manager
2. May hang infinitely
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org