2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 06:15:55 +00:00

[master] Address memory leak in dhclient code.

address memory leak
This commit is contained in:
Shawn Routhier
2014-06-10 10:30:32 -07:00
parent a89fd0cd84
commit b05e05b731
2 changed files with 9 additions and 3 deletions

View File

@@ -2413,9 +2413,11 @@ make_client_options(struct client_state *client, struct client_lease *lease,
dhcp_universe.code_hash,
&code, 0, MDL) &&
make_const_option_cache(&oc, &bp, NULL, len,
option, MDL)))
log_error("can't make option cache");
else {
option, MDL))) {
if (bp != NULL)
buffer_dereference(&bp, MDL);
log_error ("can't make option cache");
} else {
save_option(&dhcp_universe, *op, oc);
option_cache_dereference(&oc, MDL);
}