summaryrefslogtreecommitdiff
path: root/shopify.c
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-20 09:10:33 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-20 09:10:33 +0800
commitd0bad09045298e51af1efec7a5365a768ea86b16 (patch)
tree1e13f3aa91b059795d4ed0bc4921c6ec1b3a4ed9 /shopify.c
parent9766320dd79307fcb7cf6a4154a012d529387424 (diff)
Free params & dec_host only when there are params
Diffstat (limited to 'shopify.c')
-rw-r--r--shopify.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/shopify.c b/shopify.c
index 111d79c..2e62a03 100644
--- a/shopify.c
+++ b/shopify.c
@@ -384,9 +384,11 @@ static enum MHD_Result handle_request(void *cls, struct MHD_Connection *con,
MHD_HTTP_TEMPORARY_REDIRECT, res);
}
}
- free(dec_host);
- clear(params);
- free(params);
+ if (params) {
+ free(dec_host);
+ clear(params);
+ free(params);
+ }
return ret;
}