From aa4ee93d438d5a66bec26e37fe639c291d3ae02a Mon Sep 17 00:00:00 2001 From: David van Moolenbroek Date: Mon, 17 Nov 2014 20:13:46 +0000 Subject: [PATCH] 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 --- minix/commands/dhcpd/dhcpd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/minix/commands/dhcpd/dhcpd.c b/minix/commands/dhcpd/dhcpd.c index d88cb2314..daf1a6ae6 100644 --- a/minix/commands/dhcpd/dhcpd.c +++ b/minix/commands/dhcpd/dhcpd.c @@ -676,6 +676,7 @@ int main(int argc, char **argv) static struct timeval eventtv; main: + n_nets = 0; r = -1; bp = nil; program= argv[0];