aboutsummaryrefslogtreecommitdiff
path: root/src/msg.cpp
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2019-06-16 23:24:49 -0400
committerDeterminant <[email protected]>2019-06-16 23:24:49 -0400
commit74e4246565ba5814a92ed9f84b13b17226f219d1 (patch)
tree161a15482225dce9a3940e70bfd3b5e1a50cf497 /src/msg.cpp
parent77a765023bff4fa3d41001bdc1de9d106e35f348 (diff)
do not free the moved pointer for C API; misc changes
Diffstat (limited to 'src/msg.cpp')
-rw-r--r--src/msg.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/msg.cpp b/src/msg.cpp
index d525cd5..be5b4b1 100644
--- a/src/msg.cpp
+++ b/src/msg.cpp
@@ -5,9 +5,7 @@
extern "C" {
msg_t *msg_new_moved_from_bytearray(_opcode_t opcode, bytearray_t *_moved_payload) {
- auto res = new msg_t(opcode, std::move(*_moved_payload));
- bytearray_free(_moved_payload);
- return res;
+ return new msg_t(opcode, std::move(*_moved_payload));
}
void msg_free(msg_t *msg) { delete msg; }