From 14fbd033b8526a0abb2fce31c36ef7d011f93467 Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Tue, 15 Sep 2015 12:57:46 +0200 Subject: [PATCH] close a leak --- ot-recorder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ot-recorder.c b/ot-recorder.c index 1ddd11a..314bfd0 100644 --- a/ot-recorder.c +++ b/ot-recorder.c @@ -524,10 +524,11 @@ void on_message(struct mosquitto *mosq, void *userdata, const struct mosquitto_m if ((j = json_find_member(geo, "addr")) != NULL) { utstring_printf(addr, "%s", j->string_); } - + json_delete(geo); } else { if ((geo = revgeo(lat, lon, addr, cc)) != NULL) { gcache_json_put(ud->gc, utstring_body(ghash), geo); + json_delete(geo); } else { /* We didn't obtain reverse Geo, maybe because of over * quota; make a note of the missing geohash */