From 4985e321d57600faf206e22ed1228b9bd442a4f3 Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Mon, 13 Mar 2023 19:51:02 +0100 Subject: IqHandling: Fix use-after-move Fixes #544. --- src/client/QXmppIqHandling.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/client') diff --git a/src/client/QXmppIqHandling.h b/src/client/QXmppIqHandling.h index 7535bc30..63eba306 100644 --- a/src/client/QXmppIqHandling.h +++ b/src/client/QXmppIqHandling.h @@ -95,12 +95,10 @@ namespace Private { iq.parse(element); iq.setE2eeMetadata(e2eeMetadata); - processHandleIqResult( - client, - iq.id(), - iq.from(), - e2eeMetadata, - invokeIqHandler(std::forward(handler), std::move(iq))); + auto id = iq.id(), from = iq.from(); + + processHandleIqResult(client, id, from, e2eeMetadata, + invokeIqHandler(std::forward(handler), std::move(iq))); return true; } return false; -- cgit v1.2.3