mirror of
https://github.com/simon987/sist2.git
synced 2025-04-19 18:26:43 +00:00
Free tag json if parsing failed
This commit is contained in:
parent
3b0ab3679a
commit
54d902146a
@ -528,6 +528,7 @@ void tag(struct mg_connection *nc, struct mg_http_message *hm) {
|
|||||||
tag_req_t *req = parse_tag_request(json);
|
tag_req_t *req = parse_tag_request(json);
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
LOG_DEBUGF("serve.c", "Could not parse tag request", arg_index);
|
LOG_DEBUGF("serve.c", "Could not parse tag request", arg_index);
|
||||||
|
cJSON_Delete(json);
|
||||||
HTTP_REPLY_BAD_REQUEST
|
HTTP_REPLY_BAD_REQUEST
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user