fix: memory leak

This commit is contained in:
Tobias Reisinger 2020-05-22 22:48:33 +02:00
parent 5e64f5963c
commit 3acea7fc2f

View file

@ -247,6 +247,7 @@ api_v1_schedules_STR_PUT(struct http_message *hm, endpoint_args_t *args, endpoin
response->alloced_content = true;
}
cJSON_Delete(json);
relay_free_list(relays);
schedule_free(schedule);
}
@ -294,6 +295,8 @@ api_v1_schedules_STR_DELETE(struct http_message *hm, endpoint_args_t *args, endp
response->content_length = STRLEN(content);;
response->content = content;
response->alloced_content = false;
schedule_free(schedule);
return;
}