summaryrefslogtreecommitdiff
path: root/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
commitdb3d885edacb4508ec19f0d6380b6de618cc8643 (patch)
tree7e4cf000f4c322d07ce0e1c55a81ab3996ef2a00 /cpp/src
parent898afb6de15328123e315d411956bc72569bc3f2 (diff)
downloadqpid-python-db3d885edacb4508ec19f0d6380b6de618cc8643.tar.gz
Fix memory error that was crashing broker.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@557672 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/broker/Connection.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/Connection.cpp b/cpp/src/qpid/broker/Connection.cpp
index dfe2101bc0..978228a364 100644
--- a/cpp/src/qpid/broker/Connection.cpp
+++ b/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);
}
}