From d0bad09045298e51af1efec7a5365a768ea86b16 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: Tue, 20 Sep 2022 09:10:33 +0800 Subject: Free params & dec_host only when there are params --- shopify.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'shopify.c') 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; } -- cgit v1.2.3