diff options
Diffstat (limited to 'sbin/dhclient')
-rw-r--r-- | sbin/dhclient/dhclient.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 36a6478..2c722fe 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -2252,6 +2252,8 @@ check_option(struct client_lease *l, int option) if (!res_hnok(sbuf)) { warning("Bogus Host Name option %d: %s (%s)", option, sbuf, opbuf); + l->options[option].len = 0; + free(l->options[option].data); return (0); } return (1); @@ -2260,7 +2262,8 @@ check_option(struct client_lease *l, int option) if (!check_search(sbuf)) { warning("Bogus domain search list %d: %s (%s)", option, sbuf, opbuf); - return (0); + l->options[option].len = 0; + free(l->options[option].data); } } return (1); |