aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-02-21 16:28:34 +0200
committerSergey Poznyakoff <gray@gnu.org>2016-02-21 16:28:34 +0200
commit07838fb2e9ed5769074add028e052a3b667e67e7 (patch)
tree671a34f3a25abece344e27eb0d5fc4c0ed33e4b1 /src
parenta3f25ce24dcaff123fb71db89419d3ae12ddb57a (diff)
downloadgrecs-07838fb2e9ed5769074add028e052a3b667e67e7.tar.gz
grecs-07838fb2e9ed5769074add028e052a3b667e67e7.tar.bz2
Fix memory leaks
Diffstat (limited to 'src')
-rw-r--r--src/json-gram.y1
-rw-r--r--src/jsonfmt.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/json-gram.y b/src/json-gram.y
index ab65362..ca50097 100644
--- a/src/json-gram.y
+++ b/src/json-gram.y
@@ -215,6 +215,7 @@ json_value_free(struct json_value *obj)
215 case json_arr: 215 case json_arr:
216 for (i = 0; i < obj->v.a->oc; i++) 216 for (i = 0; i < obj->v.a->oc; i++)
217 json_value_free(obj->v.a->ov[i]); 217 json_value_free(obj->v.a->ov[i]);
218 grecs_free (obj->v.a->ov);
218 if (obj->v.a->ol) { 219 if (obj->v.a->ol) {
219 obj->v.a->ol->free_entry = objfree; 220 obj->v.a->ol->free_entry = objfree;
220 grecs_list_free(obj->v.a->ol); 221 grecs_list_free(obj->v.a->ol);
diff --git a/src/jsonfmt.c b/src/jsonfmt.c
index 0687faf..0f44536 100644
--- a/src/jsonfmt.c
+++ b/src/jsonfmt.c
@@ -147,6 +147,7 @@ json_format_obj(struct json_format *fmt, struct json_value *obj, size_t level)
147 } 147 }
148 } 148 }
149 json_writec(fmt, '}'); 149 json_writec(fmt, '}');
150 grecs_free(keypairs);
150} 151}
151 152
152static void 153static void

Return to:

Send suggestions and report system problems to the System administrator.