diff --git a/keepalived/core/main.c b/keepalived/core/main.c index 4628e5e2b..0316e8450 100644 --- a/keepalived/core/main.c +++ b/keepalived/core/main.c @@ -994,7 +994,7 @@ reload_check_child_thread(thread_ref_t thread) static void start_validate_reload_conf_child(void) { - notify_script_t script; + notify_script_t script = { .path = NULL }; int i; int ret; int argc; diff --git a/lib/notify.c b/lib/notify.c index b6f9df1dc..119c826c5 100644 --- a/lib/notify.c +++ b/lib/notify.c @@ -214,7 +214,7 @@ system_call_script(thread_master_t *m, thread_func_t func, void * arg, unsigned execve(script->path ? script->path : script->args[0], args.execve_args, environ); /* error */ - log_message(LOG_ALERT, "Error exec-ing command '%s', error %d: %m", script->args[0], errno); + log_message(LOG_ALERT, "Error exec-ing command '%s', error %d: %m", script->path ? script->path : script->args[0], errno); } else { retval = system(str = cmd_str(script));