summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-02-02 23:20:25 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-02-02 23:20:25 +0800
commitb1e8c81968aeff7cd58c6748f5ee0247e8187848 (patch)
tree060473dc5728319e692796d484b75f836f8c684f
parent8107effd171ffb5285e4e6d79ff9a2b7e4669c79 (diff)
Free response userData on login for Emscripten
-rw-r--r--client.cxx3
1 files changed, 3 insertions, 0 deletions
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);