]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix potential issue if we don't want routes and we fail a decode. v5.6.7
authorRoy Marples <roy@marples.name>
Mon, 28 Jan 2013 09:54:03 +0000 (09:54 +0000)
committerRoy Marples <roy@marples.name>
Mon, 28 Jan 2013 09:54:03 +0000 (09:54 +0000)
dhcp.c

diff --git a/dhcp.c b/dhcp.c
index 7b678d5a2270989e4359dc666f348876a472ded9..6a08cf099c1060132d5f68a5080d56042c4a854f 100644 (file)
--- 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) {