diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-03-29 10:11:16 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-06-25 12:13:28 -0400 |
commit | 48b6a237d21a3a634694d823a1acdb0c6302474e (patch) | |
tree | d17878566e6eb523991c9dded4b5259c2c3cf40e /util | |
parent | 8cffdd6ed0e8e1c37b565e86b371c52e0190c706 (diff) | |
download | mongo-48b6a237d21a3a634694d823a1acdb0c6302474e.tar.gz |
fix MessagingPort leaking SERVER-777
From: Guillaume Delannoy <guillaumedelannoy@ymail.com>
Signed-off-by: Eliot Horowitz <eliot@10gen.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/message_server_port.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/util/message_server_port.cpp b/util/message_server_port.cpp index fa8f9e5e8d5..2350ec2d665 100644 --- a/util/message_server_port.cpp +++ b/util/message_server_port.cpp @@ -31,7 +31,7 @@ namespace mongo { void threadRun(){ assert( grab ); - MessagingPort * p = grab; + auto_ptr<MessagingPort> p( grab ); grab = 0; Message m; @@ -45,12 +45,11 @@ namespace mongo { break; } - handler->process( m , p ); + handler->process( m , p.get() ); } } catch ( ... ){ problem() << "uncaught exception in PortMessageServer::threadRun, closing connection" << endl; - delete p; } } |