From: Shawn Routhier Date: Tue, 10 Jun 2014 17:30:32 +0000 (-0700) Subject: [master] Address memory leak in dhclient code. X-Git-Tag: v4_3_1b1~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b05e05b73155b71a0b34f449e6269beff2170c6f;p=thirdparty%2Fdhcp.git [master] Address memory leak in dhclient code. address memory leak --- diff --git a/RELNOTES b/RELNOTES index 8f7943bb4..1379d604c 100644 --- a/RELNOTES +++ b/RELNOTES @@ -170,6 +170,10 @@ by Eric Young (eay@cryptsoft.com). in a pool are used. [ISC-Bugs #34487] +- Add code to properly dereference a pointer in the dhclient code + on an error condition. + [ISC-Bugs #36194 + Changes since 4.3.0rc1 - None diff --git a/client/dhclient.c b/client/dhclient.c index 6d348c1ef..12c42b792 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -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); }