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

diff --git a/dhcp.c b/dhcp.c
index 5c7199872bd938547cf5a186e7acc336383c9f41..385bfb44158d4c51d8625998034d55424e1ee07b 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -784,6 +784,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) {