aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjobol <jose.bollo@iot.bzh>2018-04-03 14:46:15 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2018-04-05 10:48:01 +0200
commit3f53c6fff76d6200ebf2165f5d206684a142db35 (patch)
treeeb8eef2031ac702222d58df49f3ee01b7530bf5f
parent9762ccca21386705e6c59c88a9367e71a5e5e454 (diff)
afm-udb: Fix corrupted memory
Change-Id: Ib78b0843f819f232b05ac45124fe888c784f65d4 Signed-off-by: jobol <jose.bollo@iot.bzh>
-rw-r--r--src/afm-udb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/afm-udb.c b/src/afm-udb.c
index e9b1e2d..be1a5d3 100644
--- a/src/afm-udb.c
+++ b/src/afm-udb.c
@@ -117,7 +117,7 @@ static int append_field(
array = json_object_new_array();
if (!array)
goto error;
- json_object_array_add(array, item);
+ json_object_array_add(array, json_object_get(item));
json_object_object_add(object, name, array);
}
json_object_array_add(array, data);