]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
routes: free optional routes at exit before the global free list.
authorRoy Marples <roy@marples.name>
Wed, 28 Mar 2018 18:31:02 +0000 (18:31 +0000)
committerRoy Marples <roy@marples.name>
Wed, 28 Mar 2018 18:31:02 +0000 (18:31 +0000)
src/dhcpcd.c

index 291b9b5d3c8c368543e11ec3a84e83e6c4c62c56..4944c00f537307b3a04817ad184df30f0a6ccce0 100644 (file)
@@ -2022,6 +2022,7 @@ exit1:
                }
                free(ctx.ifaces);
        }
+       free_options(&ctx, ifo);
        rt_dispose(&ctx);
        free(ctx.duid);
        if (ctx.link_fd != -1) {
@@ -2029,7 +2030,6 @@ exit1:
                close(ctx.link_fd);
        }
        if_closesockets(&ctx);
-       free_options(&ctx, ifo);
        free_globals(&ctx);
        ipv6_ctxfree(&ctx);
        dev_stop(&ctx);