summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/InlineAllocator.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/InlineAllocator.h')
-rw-r--r--cpp/src/qpid/InlineAllocator.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/qpid/InlineAllocator.h b/cpp/src/qpid/InlineAllocator.h
index 0bb30fa1a4..fd652aca03 100644
--- a/cpp/src/qpid/InlineAllocator.h
+++ b/cpp/src/qpid/InlineAllocator.h
@@ -23,6 +23,7 @@
*/
#include <memory>
+#include <assert.h>
namespace qpid {
@@ -49,7 +50,10 @@ class InlineAllocator : public BaseAllocator {
}
void deallocate(pointer p, size_type n) {
- if (p == store) allocated=false;
+ if (p == store) {
+ assert(allocated);
+ allocated=false;
+ }
else BaseAllocator::deallocate(p, n);
}