From: Roy Marples Date: Thu, 11 Sep 2008 15:50:19 +0000 (+0000) Subject: Fix removing old config. X-Git-Tag: v5.0.0~263 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4012b7e1bdb720fcae58fbe499f59b4dedd7223;p=thirdparty%2Fdhcpcd.git Fix removing old config. --- diff --git a/dhcpcd.c b/dhcpcd.c index d7111117..0eb61cf5 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -180,11 +180,10 @@ void drop_config(struct interface *iface, const char *reason) { if (iface->state->new || strcmp(reason, "FAIL") == 0) { - free(iface->state->new); + free(iface->state->old); + iface->state->old = iface->state->new; iface->state->new = NULL; configure(iface, reason); - free(iface->state->old); - iface->state->old = NULL; } iface->state->lease.addr.s_addr = 0; }