fix memory leak in ares_send (#511)
When the condition channel->nservers < 1 holds, the function returns prematurely, without deallocating query->tcpbuf. We rearrange the check to be done prior to the allocations, avoiding the memory leak. In this way, we also avoid unnecessary allocations if channel->nservers < 1 holds. Fix By: Nikolaos Chatzikonstantinou (@createyourpersonalaccount)pull/515/head
parent
87002e39b8
commit
38b30bc922
1 changed files with 5 additions and 7 deletions
Loading…
Reference in new issue