From: Roy Marples Date: Mon, 28 Jan 2013 09:54:03 +0000 (+0000) Subject: Fix potential issue if we don't want routes and we fail a decode. X-Git-Tag: v5.6.7^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44e940cd03e08dd8b73d2ad90e4943899df28dcd;p=thirdparty%2Fdhcpcd.git Fix potential issue if we don't want routes and we fail a decode. --- diff --git a/dhcp.c b/dhcp.c index 7b678d5a..6a08cf09 100644 --- a/dhcp.c +++ b/dhcp.c @@ -822,6 +822,8 @@ get_option_routes(struct interface *ifp, const struct dhcp_message *dhcp) /* OK, get our static routes first. */ if (!has_option_mask(ifo->nomask, DHO_STATICROUTE)) p = get_option(dhcp, DHO_STATICROUTE, &len, NULL); + else + p = NULL; if (p) { e = p + len; while (p < e) {