From 39baade30450302dcf06bcda3b9166b5103ff8db Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 17 Sep 2013 10:32:38 +0200 Subject: [PATCH] MetaType: Fix memory leak of QAtomicInt. Change-Id: I04c87c4caeb96c820c4d332a803cb2824fea5891 Reviewed-by: Olivier Goffart --- src/corelib/kernel/qvariant.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index d9aaf0c1f5..1f35850043 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -594,6 +594,7 @@ public: inline ~const_iterator() { if (!ref->deref()) { m_impl.destroyIter(); + delete ref; } } @@ -663,6 +664,7 @@ public: inline ~const_iterator() { if (!ref->deref()) { m_impl.destroyIter(); + delete ref; } } inline const_iterator(const const_iterator &other) : m_impl(other.m_impl), ref(other.ref) {