mirror of
https://github.com/owntracks/recorder.git
synced 2026-05-05 02:36:45 +00:00
free no-longer needed json data
addresses https://github.com/owntracks/recorder/issues/464
This commit is contained in:
4
http.c
4
http.c
@@ -1053,9 +1053,12 @@ static int view(struct mg_connection *conn, const char *viewname)
|
||||
|
||||
if ((geoline = geo_linestring(locarray)) != NULL) {
|
||||
json_delete(obj);
|
||||
json_delete(locarray);
|
||||
return (json_response(conn, geoline));
|
||||
}
|
||||
|
||||
json_delete(locarray);
|
||||
|
||||
/* Return empty object */
|
||||
|
||||
return (json_response(conn, obj));
|
||||
@@ -1101,6 +1104,7 @@ static int view(struct mg_connection *conn, const char *viewname)
|
||||
json_append_member(obj, "data", locarray);
|
||||
|
||||
json_delete(view);
|
||||
json_delete(locarray);
|
||||
|
||||
return (json_response(conn, obj));
|
||||
/* NOTREACHED */
|
||||
|
||||
Reference in New Issue
Block a user