projects
/
jansson.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f471e63
)
Fix a potential memory leak
author
Petri Lehtinen
<petri@digip.org>
Tue, 24 Jan 2012 18:35:59 +0000
(20:35 +0200)
committer
Petri Lehtinen
<petri@digip.org>
Tue, 24 Jan 2012 18:35:59 +0000
(20:35 +0200)
src/value.c
patch
|
blob
|
history
diff --git
a/src/value.c
b/src/value.c
index
5ef4138
..
e0e21cb
100644
(file)
--- a/
src/value.c
+++ b/
src/value.c
@@
-124,10
+124,10
@@
int json_object_set_new_nocheck(json_t *json, const char *key, json_t *value)
json_object_t *object;
object_key_t *k;
- if(!
key || !
value)
+ if(!value)
return -1;
- if(!json_is_object(json) || json == value)
+ if(!
key || !
json_is_object(json) || json == value)
{
json_decref(value);
return -1;