service: fix json object leak in validate code
authorFelix Fietkau <nbd@openwrt.org>
Sun, 25 May 2014 19:29:36 +0000 (21:29 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 25 May 2014 19:29:36 +0000 (21:29 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
service/validate.c

index 2e610c7268af6cc86acf0c6e020b6847f85a9d17..3312d1dda956adf134e226226a6e866ae8d99f40 100644 (file)
@@ -66,6 +66,7 @@ service_validate_dump_all(struct blob_buf *b, char *p, char *s)
                        json_object_object_add(t, vr->option, json_object_new_string(vr->rule));
        }
        blobmsg_add_object(b, r);
+       json_object_put(r);
 }
 
 void