From: Otto Moerbeek Date: Mon, 21 Jun 2021 14:33:00 +0000 (+0200) Subject: move instead of copy data to inMSG X-Git-Tag: dnsdist-1.7.0-alpha1~138^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F10428%2Fhead;p=thirdparty%2Fpdns.git move instead of copy data to inMSG Co-authored-by: Remi Gacogne --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 0e782a1a63..0f6b87580e 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -493,7 +493,7 @@ LWResult::Result arecvtcp(PacketBuffer& data, const size_t len, shared_ptrtcphandler = 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; } -