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 2023/01/15 07:00:32 UTC

[GitHub] [nuttx] jlaitine commented on pull request #8114: Revert "arch: Don't free the context if the reference doesn't equal z…

jlaitine commented on PR #8114:
URL: https://github.com/apache/nuttx/pull/8114#issuecomment-1383073252

   > @jlaitine I can't see why the memory leak happen before reverting, could you explain more?
   
   If there are more than one client using it already, and another driver initialization fails periodically, the refs counter is > 0. But after the patch the driver allocates it's own structure on every call to initialize, but doesn't any more free it on uninitialize.
   
   The previous implementation was correct (although it is silly to malloc in the first place, the malloced struct just stores two pointers and no client specific data...)


-- 
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