telize

High performance JSON IP and GeoIP REST API (IP Geolocation)
Log | Files | Refs | README | LICENSE

commit 0905e967c421295c2584f49692ecee4e2056928f
parent a7cd71672b102068123eedf549b346c814dec351
Author: Frederic Cambus <fred@statdns.com>
Date:   Fri,  5 Oct 2018 13:39:06 +0200

Free JSON payload memory once the request is served

Diffstat:
Msrc/jsonip.c | 1+
Msrc/location.c | 1+
2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/jsonip.c b/src/jsonip.c @@ -56,6 +56,7 @@ jsonip(struct http_request *req) http_response_header(req, "content-type", "application/json; charset=utf-8"); http_response(req, 200, answer, strlen(answer)); + free(answer); kore_free(addr); return (KORE_RESULT_OK); diff --git a/src/location.c b/src/location.c @@ -155,6 +155,7 @@ location(struct http_request *req) http_response(req, 200, answer, strlen(answer)); kore_free(addr); + free(answer); return (KORE_RESULT_OK); }