From 9fc9c0c4d08001401d1eaa02b6e972a8f032e6b6 Mon Sep 17 00:00:00 2001 From: Frank Benkstein Date: Tue, 2 Oct 2007 18:09:16 +0200 Subject: [PATCH] src/script.c: pass error from launch_script --- src/script.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/script.c b/src/script.c index 6233e0c..9d86aef 100644 --- a/src/script.c +++ b/src/script.c @@ -102,9 +102,15 @@ bool init_script(struct plugin *p) /* Launch the script. */ p->context = launch_script(path); - free(path); - - return true; + if (p->context == NULL) { + int errsv = errno; + free(path); + errno = errsv; + return false; + } else { + free(path); + return true; + } } static void destroy_script(struct plugin *p) -- 2.11.4.GIT