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

RELNOTES
client/dhclient.c

index 9b32b94cbb191a52e0f810275feddbc6655728b1..7a83cf538d22ebc55d50e84cae240963b282d639 100644 (file)
--- 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
index 657737e614fc2a694edbbc0ea4a76f83d8b9efce..8d803d9ec863226893a099aaf918dc512b74e5b3 100644 (file)
@@ -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);
                        }