From 202c7d893f14e65fbb89e9cf7b37a3502bf923ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Tue, 17 Sep 2019 09:24:42 +0200 Subject: Use std::move on data-ptr in qoauth1signature's move ctor I was getting a double-free when it went out of scope after a move. Change-Id: Ifaa4b32b76d99635fc2e0db3bcd675c9a9a9bfa9 Reviewed-by: Jesus Fernandez --- src/oauth/qoauth1signature.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/oauth/qoauth1signature.cpp b/src/oauth/qoauth1signature.cpp index aec2de3..f6ecdc0 100644 --- a/src/oauth/qoauth1signature.cpp +++ b/src/oauth/qoauth1signature.cpp @@ -224,9 +224,8 @@ QOAuth1Signature::QOAuth1Signature(const QOAuth1Signature &other) : d(other.d) Move-constructs a QOAuth1Signature instance, taking over the private data \a other was using. */ -QOAuth1Signature::QOAuth1Signature(QOAuth1Signature &&other) : d(other.d) +QOAuth1Signature::QOAuth1Signature(QOAuth1Signature &&other) : d(std::move(other.d)) { - other.d = &QOAuth1SignaturePrivate::shared_null; } /*! -- cgit v1.2.3