Merge pull request #380 from jeaneric/Fix-tag

Fix tag
This commit is contained in:
simon987 2023-07-01 08:37:21 -04:00 committed by GitHub
commit 3b0ab3679a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -526,7 +526,6 @@ 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);
cJSON_Delete(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);
HTTP_REPLY_BAD_REQUEST HTTP_REPLY_BAD_REQUEST
@ -552,6 +551,7 @@ void tag(struct mg_connection *nc, struct mg_http_message *hm) {
} }
free(req); free(req);
cJSON_Delete(json);
} }
int validate_auth(struct mg_connection *nc, struct mg_http_message *hm) { int validate_auth(struct mg_connection *nc, struct mg_http_message *hm) {