summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-04-08 15:53:10 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-04-08 15:53:10 +0200
commit041ce4919b4513f7e019b018558e947164101b35 (patch)
tree250a13517d4b0a8c19339f75c1fc476048d2f46f
parent56f9ef4581d567248b6f83a3b15f39a0aca42895 (diff)
clean request data
Change-Id: I97d82de29374dcb9e576eef2dcd358698845226f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/afb-hreq.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/afb-hreq.c b/src/afb-hreq.c
index 00c27eb1..3ddc4d1e 100644
--- a/src/afb-hreq.c
+++ b/src/afb-hreq.c
@@ -223,11 +223,16 @@ void afb_hreq_free(struct afb_hreq *hreq)
MHD_destroy_post_processor(hreq->postform);
for (data = hreq->data; data; data = hreq->data) {
hreq->data = data->next;
+ if (data->path) {
+ unlink(data->path);
+ free(data->path);
+ }
free(data->key);
free(data->value);
free(data);
}
ctxClientPut(hreq->context);
+ json_object_put(hreq->json);
free(hreq);
}
}