]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Check if we loaded options or not.
authorRoy Marples <roy@marples.name>
Thu, 18 Aug 2016 14:37:53 +0000 (14:37 +0000)
committerRoy Marples <roy@marples.name>
Thu, 18 Aug 2016 14:37:53 +0000 (14:37 +0000)
dhcpcd.c

index 2bb94f5332d514180357387287e868020610e586..7535c816c394252f04a27d00e1321ab7008c001c 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -1135,7 +1135,8 @@ reload_config(struct dhcpcd_ctx *ctx)
        struct if_options *ifo;
 
        free_globals(ctx);
-       ifo = read_config(ctx, NULL, NULL, NULL);
+       if ((ifo = read_config(ctx, NULL, NULL, NULL)) == NULL)
+               return;
        add_options(ctx, NULL, ifo, ctx->argc, ctx->argv);
        /* We need to preserve these two options. */
        if (ctx->options & DHCPCD_MASTER)