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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
