993e8da496
The lxc_ro_promote_secondaries patch no longer applies so I disabled it for now (@offlinehacker).
26 lines
597 B
Diff
26 lines
597 B
Diff
Fix segfault when reloading the configuration: free_globals() left the
|
|
ifac/ifdc variables at -1 instead of 0, causing a crash later in
|
|
splitv().
|
|
|
|
--- a/dhcpcd.c
|
|
+++ b/dhcpcd.c
|
|
@@ -143,16 +143,18 @@
|
|
if (ctx->ifac) {
|
|
for (ctx->ifac--; ctx->ifac >= 0; ctx->ifac--)
|
|
free(ctx->ifav[ctx->ifac]);
|
|
free(ctx->ifav);
|
|
ctx->ifav = NULL;
|
|
+ ctx->ifac = 0;
|
|
}
|
|
if (ctx->ifdc) {
|
|
for (ctx->ifdc--; ctx->ifdc >= 0; ctx->ifdc--)
|
|
free(ctx->ifdv[ctx->ifdc]);
|
|
free(ctx->ifdv);
|
|
ctx->ifdv = NULL;
|
|
+ ctx->ifdc = 0;
|
|
}
|
|
|
|
#ifdef INET
|
|
if (ctx->dhcp_opts) {
|
|
for (opt = ctx->dhcp_opts;
|
|
|