]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[v4_1_esv] Address memory leak in dhclient code.
authorShawn Routhier <sar@isc.org>
Tue, 10 Jun 2014 17:34:28 +0000 (10:34 -0700)
committerShawn Routhier <sar@isc.org>
Tue, 10 Jun 2014 17:34:28 +0000 (10:34 -0700)
address memory leak

RELNOTES
client/dhclient.c

index abe0b55b393f9f23af0c039dd724e269db7d6010..b1e2cd000acaf8e33ae9f02423693f0d634c0e67 100644 (file)
--- 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
index bd7963d119181e8a2153372f141191d1cf3dbd08..3390a5755183ab2e8b773d8349b92b08c3848d9f 100644 (file)
@@ -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);
                        }