mirror of
https://github.com/simon987/sist2.git
synced 2025-12-15 08:19:06 +00:00
Fix some memory leaks
This commit is contained in:
@@ -213,8 +213,10 @@ cJSON *elastic_get_document(const char *uuid_str) {
|
||||
snprintf(url, 4096, "%s/sist2/_doc/%s", WebCtx.es_url, uuid_str);
|
||||
|
||||
response_t *r = web_get(url);
|
||||
cJSON *json = NULL;
|
||||
if (r->status_code == 200) {
|
||||
return cJSON_Parse(r->body);
|
||||
json = cJSON_Parse(r->body);
|
||||
}
|
||||
return NULL;
|
||||
free_response(r);
|
||||
return json;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user