Don't crash with empty tag: in dhcp-range.

This commit is contained in:
Simon Kelley
2013-09-05 10:21:12 +01:00
parent ff7eea27e7
commit 0c38719fe0

View File

@@ -2337,7 +2337,9 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
struct dhcp_netid *tt = opt_malloc(sizeof (struct dhcp_netid)); struct dhcp_netid *tt = opt_malloc(sizeof (struct dhcp_netid));
tt->net = opt_string_alloc(arg+4); tt->net = opt_string_alloc(arg+4);
tt->next = new->filter; tt->next = new->filter;
new->filter = tt; /* ignore empty tag */
if (tt->net)
new->filter = tt;
} }
else else
{ {