projects
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f16e5b
)
json: handle NULL explicitly in json_variant_has_type()
author
Lennart Poettering
<lennart@poettering.net>
Fri, 4 Jan 2019 12:24:18 +0000
(13:24 +0100)
committer
Michael Biebl
<biebl@debian.org>
Sat, 12 Jan 2019 20:49:44 +0000
(20:49 +0000)
(cherry picked from commit
f8c186c9ece5c1c0b89abf52f058efb0ed37e0cb
)
(cherry picked from commit
388e534d24cac041bd00b48f27a84d6b31089c67
)
Gbp-Pq: Name json-handle-NULL-explicitly-in-json_variant_has_type.patch
src/shared/json.c
patch
|
blob
|
history
diff --git
a/src/shared/json.c
b/src/shared/json.c
index 59c4617592caa1834ddb5e949f8a0a16c87de84e..c9ee74c2d317a80172d3c79fb192f556318a196a 100644
(file)
--- a/
src/shared/json.c
+++ b/
src/shared/json.c
@@
-979,6
+979,8
@@
bool json_variant_has_type(JsonVariant *v, JsonVariantType type) {
JsonVariantType rt;
v = json_variant_dereference(v);
+ if (!v)
+ return false;
rt = json_variant_type(v);
if (rt == type)