diff options
author | 2014-07-14 18:16:27 +0000 | |
---|---|---|
committer | 2014-07-14 18:16:27 +0000 | |
commit | a80184b40994aaae9cd0244a6afe92209104b8ed (patch) | |
tree | c376ebd94412c5937c60bd761efd1601a80bb4b0 | |
parent | In the next step, stop accepting the nibble-swapped protocol for 5.6. (diff) | |
download | wireguard-openbsd-a80184b40994aaae9cd0244a6afe92209104b8ed.tar.xz wireguard-openbsd-a80184b40994aaae9cd0244a6afe92209104b8ed.zip |
Make sure to correctly exit the loop in priv_flush_routes() in case of
allocation failure; ok krw@
-rw-r--r-- | sbin/dhclient/kroute.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/dhclient/kroute.c b/sbin/dhclient/kroute.c index 4c48bc5b51d..a5b040839af 100644 --- a/sbin/dhclient/kroute.c +++ b/sbin/dhclient/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.66 2014/07/09 15:16:38 krw Exp $ */ +/* $OpenBSD: kroute.c,v 1.67 2014/07/14 18:16:27 miod Exp $ */ /* * Copyright 2012 Kenneth R Westerback <krw@openbsd.org> @@ -101,7 +101,7 @@ priv_flush_routes(struct imsg_flush_routes *imsg) if ((bufp = realloc(buf, needed)) == NULL) { free(buf); errmsg = "routes buf malloc:"; - continue; + break; } buf = bufp; if (sysctl(mib, 7, buf, &needed, NULL, 0) == -1) { @@ -138,7 +138,7 @@ priv_flush_routes(struct imsg_flush_routes *imsg) case ROUTE_LABEL_DHCLIENT_OURS: /* Always delete routes we labeled. */ delete_route(s, imsg->rdomain, rtm); - break;; + break; case ROUTE_LABEL_DHCLIENT_DEAD: if (imsg->zapzombies) delete_route(s, imsg->rdomain, rtm); |