From 51a2ab2d6706d39c81a1555608ba8954068e2543 Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sat, 6 Jan 2018 11:30:27 +0100 Subject: Eliminate potential zero-dereference in get_init. --- src/pj_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/pj_init.c b/src/pj_init.c index 310206f7..2cf53e41 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -246,7 +246,8 @@ Expand key from buffer or (if not in buffer) from init file if (0==definition) return 0; init_items = string_to_paralist (ctx, definition); - pj_log (ctx, 3, "get_init: got [%s], paralist[0,1]: [%s,%s]\n", definition, init_items->param, init_items->next? init_items->next->param: "(empty)"); + if (init_items) + pj_log (ctx, 3, "get_init: got [%s], paralist[0,1]: [%s,%s]\n", definition, init_items->param, init_items->next? init_items->next->param: "(empty)"); pj_dealloc (definition); if (0==init_items) return 0; -- cgit v1.2.3