diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-09-20 08:37:11 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-09-20 08:37:11 +0800 |
commit | 1ece51ed11cd49ff7190c98f3a94623a6a6c614c (patch) | |
tree | 62e572c469975fc543c62ed27924cc5555aa64e2 | |
parent | 5b8616b86a38d07779ae796066f36c028b7c025a (diff) |
Free unused & nullify what's checked later
-rw-r--r-- | shopify.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -231,6 +231,7 @@ static enum MHD_Result handle_request(void *cls, struct MHD_Connection *con, } } else { free(params); + params = NULL; char *referer = NULL; MHD_get_connection_values(con, MHD_HEADER_KIND, iterate, (char **[]){ &session_token, &referer }); @@ -303,6 +304,8 @@ static enum MHD_Result handle_request(void *cls, struct MHD_Connection *con, free(access_token); ret = redirect(dec_host, app_id, con, &res); } else if (session_token) { + free(session_token); + free(shop); int i = 0; const struct shopify_api *api; while ((api = &(container->apis[i++]))) |