You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by sh...@apache.org on 2015/03/04 00:09:55 UTC

svn commit: r1663828 - /qpid/trunk/qpid/cpp/src/qpid/broker/PersistableQueue.h

Author: shuston
Date: Tue Mar  3 23:09:54 2015
New Revision: 1663828

URL: http://svn.apache.org/r1663828
Log:
Fix possible double-free discussed in QPID-6368

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/PersistableQueue.h

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/PersistableQueue.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/PersistableQueue.h?rev=1663828&r1=1663827&r2=1663828&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/PersistableQueue.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/PersistableQueue.h Tue Mar  3 23:09:54 2015
@@ -25,7 +25,6 @@
 #include <string>
 #include "qpid/broker/Persistable.h"
 #include "qpid/management/Manageable.h"
-#include <boost/shared_ptr.hpp>
 
 namespace qpid {
 namespace broker {
@@ -51,12 +50,12 @@ public:
 class PersistableQueue : public Persistable
 {
 public:
-    typedef boost::shared_ptr<PersistableQueue> shared_ptr;
-
     virtual const std::string& getName() const = 0;
     virtual ~PersistableQueue() {
-        if (externalQueueStore) 
+        if (externalQueueStore) {
              delete externalQueueStore;
+             externalQueueStore = 0;
+        }
     };
 
     virtual void setExternalQueueStore(ExternalQueueStore* inst) = 0;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org