From 418739c0212614263c7fde38a27c7a6e336db8e3 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sun, 13 May 2018 18:48:21 +0200 Subject: [PATCH] src: fix MallocedBuffer move assignment operator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/20883 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Joyee Cheung Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Tobias Nießen --- src/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.h b/src/util.h index 26654f15a1a626..1f43ba3f7b90f3 100644 --- a/src/util.h +++ b/src/util.h @@ -438,7 +438,7 @@ struct MallocedBuffer { } MallocedBuffer& operator=(MallocedBuffer&& other) { this->~MallocedBuffer(); - return *new(this) MallocedBuffer(other); + return *new(this) MallocedBuffer(std::move(other)); } ~MallocedBuffer() { free(data);