From 81ae37c58709cf1396b09e5136acfc8a0c259476 Mon Sep 17 00:00:00 2001 From: Burt P Date: Tue, 25 Jul 2017 14:33:49 -0500 Subject: device tree: fix crash when device tree is not found * check if device tree was found before add_keys() * UNKIFNULL(model) before strcmp * make UNKIFNULL() STRIFNULL() EMPIFNULL() macros more generic Signed-off-by: Burt P --- includes/dt_util.h | 1 + 1 file changed, 1 insertion(+) (limited to 'includes/dt_util.h') diff --git a/includes/dt_util.h b/includes/dt_util.h index e077279b..acc4ad16 100644 --- a/includes/dt_util.h +++ b/includes/dt_util.h @@ -42,6 +42,7 @@ typedef struct _dtr_obj dtr_obj; dtr *dtr_new(char *base_path); /* NULL for DTR_ROOT */ void dtr_free(dtr *); +int dtr_was_found(dtr *); const char *dtr_base_path(dtr *); char *dtr_messages(dtr *); /* returns a message log */ -- cgit v1.2.3