close a leak

This commit is contained in:
Jan-Piet Mens
2015-09-15 12:57:46 +02:00
parent 17d81c871c
commit 14fbd033b8

View File

@@ -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 */