diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2019-09-17 09:24:42 +0200 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2019-09-17 09:34:04 +0200 |
commit | 202c7d893f14e65fbb89e9cf7b37a3502bf923ec (patch) | |
tree | 217f6654d94c73af1fc199b034b9490dd4c51d98 | |
parent | 639800ccfe85daecd4432f8b7f64b258e7d2e6dc (diff) |
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 <jsfdez@gmail.com>
-rw-r--r-- | src/oauth/qoauth1signature.cpp | 3 |
1 files changed, 1 insertions, 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; } /*! |