projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6af022f
)
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
Lennart Poettering
<lennart@poettering.net>
Mon, 7 Jan 2019 16:50:39 +0000
(17:50 +0100)
src/shared/json.c
patch
|
blob
|
history
diff --git
a/src/shared/json.c
b/src/shared/json.c
index
01faf40
..
3786ff1
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)