Code Review
/
src
/
app-framework-main.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
7d6a422
)
utils-json: fix crash
author
José Bollo
<jose.bollo@iot.bzh>
Fri, 5 Feb 2016 09:40:27 +0000
(10:40 +0100)
committer
José Bollo
<jose.bollo@iot.bzh>
Fri, 5 Feb 2016 09:40:27 +0000
(10:40 +0100)
Change-Id: Ie3f38f8c9c0449c3ea28eafec358bdc81ae40b32
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/utils-json.c
patch
|
blob
|
history
diff --git
a/src/utils-json.c
b/src/utils-json.c
index
b3bee36
..
82908f4
100644
(file)
--- a/
src/utils-json.c
+++ b/
src/utils-json.c
@@
-83,7
+83,7
@@
int j_add(struct json_object *obj, const char *key, struct json_object *val)
int j_add_string(struct json_object *obj, const char *key, const char *val)
{
- struct json_object *str = json_object_new_string (val);
+ struct json_object *str = json_object_new_string (val
? val : ""
);
return str ? j_add(obj, key, str) : (errno = ENOMEM, 0);
}