X-Git-Url: http://git.asbjorn.biz/?p=debian%2Fdhcpd-pools.git;a=blobdiff_plain;f=src%2Fgetdata.c;h=c57d2c73813533f6691962fbc9d6c30e60edc807;hp=7fbe4d02484a160ce42b4e0a643f0be9d569f6fa;hb=5cbe8d07fb23db630e76d18022f20368312720ec;hpb=faf892114d4fa54bb1e4da1a41ccd749530a553c diff --git a/src/getdata.c b/src/getdata.c index 7fbe4d0..c57d2c7 100644 --- a/src/getdata.c +++ b/src/getdata.c @@ -163,6 +163,7 @@ int parse_leases(void) if (macaddr != NULL) { free(macstring); } + fclose(dhcpd_leases); return 0; } @@ -387,7 +388,7 @@ char *parse_config(int is_include, char *config_file, num_ranges++; if (RANGES < num_ranges) { errx(EXIT_FAILURE, - "parse_config: Range space full! Increase RANGES and recompile."); + "parse_config: increase default.h RANGES and recompile."); } newclause = true; break; @@ -426,8 +427,15 @@ char *parse_config(int is_include, char *config_file, * away by reallocationg * more space. */ errx(EXIT_FAILURE, - "parse_config: End of shared-network space, increase SHARED_NETWORKS_NAMES and recompile"); + "parse_config: increase default.h SHARED_NETWORKS_NAMES and recompile"); } + if (SHARED_NETWORKS < num_shared_networks) { + /* FIXME: make this go + * away by reallocationg + * more space. */ + errx(EXIT_FAILURE, + "parse_config: increase default.h SHARED_NETWORKS and recompile"); + } argument = 0; braces_shared = braces; break; @@ -452,5 +460,6 @@ char *parse_config(int is_include, char *config_file, } } free(word); + fclose(dhcpd_config); return next_free_shared_name; }