From d08eb638bd4080dbb61390f8cf33998709064e84 Mon Sep 17 00:00:00 2001 From: Shawn Routhier Date: Tue, 10 Jun 2014 10:34:28 -0700 Subject: [PATCH] [v4_1_esv] Address memory leak in dhclient code. address memory leak --- RELNOTES | 4 ++++ client/dhclient.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/RELNOTES b/RELNOTES index abe0b55b3..b1e2cd000 100644 --- a/RELNOTES +++ b/RELNOTES @@ -138,6 +138,10 @@ by Eric Young (eay@cryptsoft.com). Thanks to Steinar Haug for the suggestion. [ISC-Bugs #36033] +- Add code to properly dereference a pointer in the dhclient code + on an error condition. + [ISC-Bugs #36194 + Changes since 4.1-ESV-R9rc1 - None diff --git a/client/dhclient.c b/client/dhclient.c index bd7963d11..3390a5755 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -2370,9 +2370,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))) + option, MDL))) { + if (bp != NULL) + buffer_dereference(&bp, MDL); log_error ("can't make option cache"); - else { + } else { save_option (&dhcp_universe, *op, oc); option_cache_dereference (&oc, MDL); } -- 2.47.3