diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-02-02 23:12:42 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-02-02 23:12:42 +0800 |
commit | 1616421120fc238beda654696541275c9aa0744c (patch) | |
tree | c3a9a6c804a9bdda9c72e9ec7252a8a4605bbeda /client.c | |
parent | 12cde42c929b63a1ef1b2ad7f3482336419980b2 (diff) |
Response userData is not freed here for Emscripten
When the user data is a pointer to the callback function, not a POST
body, it must not be freed, otherwise the app will crash/not function.
For now freeing it is handed to the user, which in this case, is
qrtclient. It's freed when it's a POST body, e.g. when logging in, and
no freeing code when GETting data from REST API.
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -46,8 +46,6 @@ void rtclient_login(const char *name, const char *password, void rtclient_free_response(rtclient_response *response) { #ifdef __EMSCRIPTEN__ - if (response->userData) - free(response->userData); emscripten_fetch_close(response); #else free(response->data); |