summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2013-01-28 09:54:03 +0000
committerRoy Marples <roy@marples.name>2013-01-28 09:54:03 +0000
commit44e940cd03e08dd8b73d2ad90e4943899df28dcd (patch)
treebadcda28d077b4c3e7a1dcc0e912113c4053868e
parent3816bc05c305971e69e0b787c43f323108cbd400 (diff)
downloaddhcpcd-5.6.7.tar.xz
Fix potential issue if we don't want routes and we fail a decode.dhcpcd-5.6.7
-rw-r--r--dhcp.c2
1 files changed, 2 insertions, 0 deletions
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) {