]> granicus.if.org Git - transmission/commit
(trunk libT) fix possible memory leak in tr-udp's EV_READ handler.
authorJordan Lee <jordan@transmissionbt.com>
Fri, 4 Mar 2011 21:38:04 +0000 (21:38 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Fri, 4 Mar 2011 21:38:04 +0000 (21:38 +0000)
commit918f6a96e0a341800c37a69d5c87dbb3e91f7248
treed5ef593449e86c11a015ba8669e66e16729f137b
parent3fdd80eb0de7db0aa5038c65f6e349663cd43433
(trunk libT) fix possible memory leak in tr-udp's EV_READ handler.

The EV_READ callback allocates a buffer, but then returns without freeing it if recvfrom() returns <= 0. This commit inverts the logic to avoid returning until the buffer's been free()d.
libtransmission/tr-udp.c