Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Unified Diff: native_client_sdk/src/libraries/nacl_io/socket/udp_node.cc

Issue 487363003: [NaCl SDK] nacl_io: Fix leak when recv'ing from udp socket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/libraries/nacl_io/socket/udp_node.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/socket/udp_node.cc b/native_client_sdk/src/libraries/nacl_io/socket/udp_node.cc
index 9b0bfc8f1801f9fa26c1c36f4259fb158b30fa96..7caef65640705e66dab0b7c9b5e2662987008c1b 100644
--- a/native_client_sdk/src/libraries/nacl_io/socket/udp_node.cc
+++ b/native_client_sdk/src/libraries/nacl_io/socket/udp_node.cc
@@ -134,6 +134,7 @@ class UdpRecvWork : public UdpWork {
if (length_error > 0) {
Packet* packet = new Packet(filesystem()->ppapi());
packet->Copy(data_, length_error, addr_);
+ filesystem()->ppapi()->ReleaseResource(addr_);
yzshen1 2014/08/19 18:37:29 drive-by: Maybe we could consider "safer" ref-coun
noelallen1 2014/08/19 20:46:59 While it is possible to call Start without calling
yzshen1 2014/08/19 20:53:16 Thanks for reply! If the completion callback is "
emitter_->WriteRXPacket_Locked(packet);
stream->ClearStreamFlags(SSF_RECVING);
stream->QueueInput();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698