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

RELNOTES
client/dhclient.c

index 8f7943bb47d30c4aa1ce42fe76121c38f3f62052..1379d604c1165d66c75ec89418d251abea68fe57 100644 (file)
--- 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
index 6d348c1ef0889dfd183bec90867a38688f2af4fa..12c42b792709a014fc8c6b5bd2ee5594fece78c0 100644 (file)
@@ -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);
                        }