dhcpd: don't crash so easily

The jump-to-start hack is not resetting global variables, resulting in
a crash after several such restarts cause an overflow in the network
table.  This patch fixes that particular issue, but more similar
issues (in particular memory leaks) are bound to come up.  As such this
is a stopgap measure until we can get rid of the old dhcpd altogether.

This resolves the additional issue reported in #2.

Change-Id: Ic4cd80eae520cf2b97e893bac63b3ab1ecfea6d8
This commit is contained in:
David van Moolenbroek 2014-11-17 20:13:46 +00:00
parent b49f4cacde
commit aa4ee93d43

View file

@ -676,6 +676,7 @@ int main(int argc, char **argv)
static struct timeval eventtv; static struct timeval eventtv;
main: main:
n_nets = 0;
r = -1; r = -1;
bp = nil; bp = nil;
program= argv[0]; program= argv[0];