From 17d2e4f47b29692d26c243a8d05987e5e5f53b43 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 23 Feb 2013 19:23:01 +0100 Subject: [PATCH] fix json_object_from_file return value handling Signed-off-by: John Crispin --- hotplug-rule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) { -- 2.25.1