diff options
-rw-r--r-- | include/dbus_privileges.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/dbus_privileges.hpp b/include/dbus_privileges.hpp index 6602a5c2fa..b2bb1e3b70 100644 --- a/include/dbus_privileges.hpp +++ b/include/dbus_privileges.hpp @@ -150,7 +150,8 @@ void validatePrivilege(Request& req, } std::string username = req.session->username; crow::connections::systemBus->async_method_call( - [&req, asyncResp, &rule, callback(std::forward<CallbackFn>(callback))]( + [req{std::move(req)}, asyncResp, &rule, + callback(std::forward<CallbackFn>(callback))]( const boost::system::error_code& ec, const dbus::utility::DBusPropertiesMap& userInfoMap) mutable { afterGetUserInfo(req, asyncResp, rule, |