summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}