summaryrefslogtreecommitdiffstats
path: root/hotplug-rule.c
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-02-23 19:23:01 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-02-23 19:28:10 +0100
commit17d2e4f47b29692d26c243a8d05987e5e5f53b43 (patch)
treee7469bf4bad8a5b58fdd305a9ec84220a018fd97 /hotplug-rule.c
parent9f81efba3e70526d7ad15510192ad42b968240c8 (diff)
downloadunitd-17d2e4f47b29692d26c243a8d05987e5e5f53b43.tar
unitd-17d2e4f47b29692d26c243a8d05987e5e5f53b43.zip
fix json_object_from_file return value handling
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'hotplug-rule.c')
-rw-r--r--hotplug-rule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hotplug-rule.c b/hotplug-rule.c
index b90ae52..cb31c3f 100644
--- a/hotplug-rule.c
+++ b/hotplug-rule.c
@@ -467,7 +467,7 @@ rule_file_load(const char *filename)
return NULL;
obj = json_object_from_file((char *) filename);
- if (!obj)
+ if (is_error(obj))
return NULL;
if (!json_object_is_type(obj, json_type_array)) {