diff options
author | Benoit Foucher <benoit@zeroc.com> | 2009-11-25 22:00:59 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2009-11-25 22:00:59 +0100 |
commit | f39b0b1a800ace86b4682d3ac371ffd6c061ba65 (patch) | |
tree | f5e91cc5e62c4751309aa2cb2e7be1a5d5b20a92 /cpp/src | |
parent | - Cleaned up test/Ice/operations test (diff) | |
download | ice-f39b0b1a800ace86b4682d3ac371ffd6c061ba65.tar.bz2 ice-f39b0b1a800ace86b4682d3ac371ffd6c061ba65.tar.xz ice-f39b0b1a800ace86b4682d3ac371ffd6c061ba65.zip |
Fixed C++ memory leak
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/ConnectionI.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp index f380b94c348..6218e86c91d 100644 --- a/cpp/src/Ice/ConnectionI.cpp +++ b/cpp/src/Ice/ConnectionI.cpp @@ -111,6 +111,12 @@ Ice::ConnectionI::OutgoingMessage::sent(ConnectionI* connection, bool notify) { isSent = true; // The message is sent. + if(adopted) + { + delete stream; + stream = 0; + } + if(out) { out->sent(notify); // true = notify the waiting thread that the request was sent. @@ -124,12 +130,6 @@ Ice::ConnectionI::OutgoingMessage::sent(ConnectionI* connection, bool notify) { return false; } - - if(adopted) - { - delete stream; - stream = 0; - } } void |