]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
move instead of copy data to inMSG 10428/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 21 Jun 2021 14:33:00 +0000 (16:33 +0200)
committerGitHub <noreply@github.com>
Mon, 21 Jun 2021 14:33:00 +0000 (16:33 +0200)
Co-authored-by: Remi Gacogne <github@coredump.fr>
pdns/pdns_recursor.cc

index 0e782a1a63ab307ce970c625577bced777e804ee..0f6b87580e1a128b3faa02e9ceecea9969504b6e 100644 (file)
@@ -493,7 +493,7 @@ LWResult::Result arecvtcp(PacketBuffer& data, const size_t len, shared_ptr<TCPIO
   pident->tcphandler = handler;
   pident->tcpsock = handler->getDescriptor();
   // We might have a partial result
-  pident->inMSG = data;
+  pident->inMSG = std::move(data);
   pident->inPos = pos;
   pident->inWanted = len;
   pident->inIncompleteOkay = incompleteOkay;
@@ -5937,4 +5937,3 @@ int main(int argc, char **argv)
   return ret;
 }
 
-