From b1e8c81968aeff7cd58c6748f5ee0247e8187848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Wed, 2 Feb 2022 23:20:25 +0800 Subject: Free response userData on login for Emscripten --- client.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client.cxx b/client.cxx index c931191..1f64e80 100644 --- a/client.cxx +++ b/client.cxx @@ -25,6 +25,9 @@ void Client::logIn(QString const& name, QString const& password) pwCopy = (char*)malloc(strlen(pwData) + 1); strcpy(pwCopy, pwData); rtclient_login(nCopy, pwCopy, [](rtclient_response* response) { +#ifdef __EMSCRIPTEN__ + free(response->userData); +#endif rtclient_free_response(response); client->emitLoggedIn(QString{nCopy}); free(nCopy); -- cgit v1.2.3