lorinlee commented on issue #1449:
URL: https://github.com/apache/incubator-brpc/issues/1449#issuecomment-869055121


   There may have another scenario that can make memory leaked. First, we call 
bthread_getspecific(key1) which borrows a KeyTable from KeyTablePool, and it 
has old values in slot `key1` and `key2` in this KeyTable, then we call 
bthread_setspecific(key2), the old value in slot key2 may leak.
   
   So, at now, we must call `bthread_getspecific` and check if there already 
have an old value before calling `bthread_setspecific`, otherwise, a memory 
leak may happen.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to