summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Routhier <sar@isc.org>2014-06-10 10:21:17 -0700
committerShawn Routhier <sar@isc.org>2014-06-10 10:21:17 -0700
commita1d87f0990a96e225cb12b238e85e16dc06a90be (patch)
tree687ad9bf900efbbe43b4c5d2330b225c53197242
parentb4326586f04ad2dd008f7485035d9c57af08b946 (diff)
downloadisc-dhcp-a1d87f0990a96e225cb12b238e85e16dc06a90be.tar.gz
[v4_2] Address memory leak in dhclient code.
address memory leak
-rw-r--r--RELNOTES4
-rw-r--r--client/dhclient.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/RELNOTES b/RELNOTES
index 9b32b94c..7a83cf53 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -128,6 +128,10 @@ by Eric Young (eay@cryptsoft.com).
Thanks to Steinar Haug for the suggestion.
[ISC-Bugs #36033]
+- Add code to properly deference a pointer in the dhclient code
+ on an error condition.
+ [ISC-Bugs #36194
+
Changes since 4.2.6rc1
- None
diff --git a/client/dhclient.c b/client/dhclient.c
index 657737e6..8d803d9e 100644
--- a/client/dhclient.c
+++ b/client/dhclient.c
@@ -2390,9 +2390,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);
}