summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-07-19 16:12:22 +0000
committerAlan Conway <aconway@apache.org>2007-07-19 16:12:22 +0000
commit524bf4773f63f5b35e51fee8b35de4f1c9c695b3 (patch)
tree83de68f695f267fb1671f7881a85fb6f38d7e41a /qpid/cpp/src
parent3e3732a9dde8b0c1e39a87a399be469e5c50f9bf (diff)
downloadqpid-python-524bf4773f63f5b35e51fee8b35de4f1c9c695b3.tar.gz
Fix memory error that was crashing broker.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@557672 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/broker/Connection.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/broker/Connection.cpp b/qpid/cpp/src/qpid/broker/Connection.cpp
index dfe2101bc0..978228a364 100644
--- a/qpid/cpp/src/qpid/broker/Connection.cpp
+++ b/qpid/cpp/src/qpid/broker/Connection.cpp
@@ -56,7 +56,11 @@ void Connection::received(framing::AMQFrame& frame){
if (frame.getChannel() == 0) {
adapter.handle(frame);
} else {
- getChannel((frame.getChannel())).in->handle(frame);
+ // Assign handler to new shared_ptr, as it may be erased
+ // from the map by handle() if frame is a ChannelClose.
+ //
+ FrameHandler::Chain handler=getChannel((frame.getChannel())).in;
+ handler->handle(frame);
}
}