From kde-commits Wed Oct 12 01:11:29 2016 From: Andreas Hartmetz Date: Wed, 12 Oct 2016 01:11:29 +0000 To: kde-commits Subject: [dferry] serialization: Fix mismatched (new / malloc) / (delete / free) found by valgrind. Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=147623469928946 Git commit 5766752aa84394433fc92164bcb0dd6072d83097 by Andreas Hartmetz. Committed on 12/10/2016 at 01:09. Pushed by ahartmetz into branch 'master'. Fix mismatched (new / malloc) / (delete / free) found by valgrind. So the just added tests did find something after all. M +1 -1 serialization/arguments.cpp http://commits.kde.org/dferry/5766752aa84394433fc92164bcb0dd6072d83097 diff --git a/serialization/arguments.cpp b/serialization/arguments.cpp index 1e9b97c..0e7c5a5 100644 --- a/serialization/arguments.cpp +++ b/serialization/arguments.cpp @@ -1807,7 +1807,7 @@ Arguments::Writer::Writer(const Writer &other) m_u(other.m_u) { if (other.d) { - d =3D new Private(*other.d); + d =3D new(allocCaches.writerPrivate.allocate()) Private(*other.d); } = }