flose files & free memory when not needed

Fixes to issues found with valgrind.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2011-03-19 20:39:01 +01:00
parent b11163012e
commit a10396710e
2 changed files with 4 additions and 0 deletions

View file

@ -163,6 +163,7 @@ int parse_leases(void)
if (macaddr != NULL) {
free(macstring);
}
fclose(dhcpd_leases);
return 0;
}
@ -452,5 +453,6 @@ char *parse_config(int is_include, char *config_file,
}
}
free(word);
fclose(dhcpd_config);
return next_free_shared_name;
}