dbus: make QDBusArgumentPrivate destructor virtual

Make the destructor of QDBusArgumentPrivate virtual as it may store
other types (QDBusDemarshaller). Suggested by Thiago.

Fixes a "new-delete-type-mismatch" error reported by AddressSanitizer.

Task-number: QTBUG-52176
Change-Id: I9ac19050840530ca9cae893b10093185d31e0448
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
Peter Wu 2016-03-28 19:43:08 +02:00 committed by Albert Astals Cid
parent a9e7bf9ffd
commit 1b9d082bb8

View File

@ -66,7 +66,7 @@ public:
inline QDBusArgumentPrivate(int flags = 0)
: message(0), ref(1), capabilities(flags)
{ }
~QDBusArgumentPrivate();
virtual ~QDBusArgumentPrivate();
static bool checkRead(QDBusArgumentPrivate *d);
static bool checkReadAndDetach(QDBusArgumentPrivate *&d);