]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[v4_1_esv] Fix a memory leak in the v6 version of the client code
authorShawn Routhier <sar@isc.org>
Wed, 21 Oct 2015 03:16:26 +0000 (20:16 -0700)
committerShawn Routhier <sar@isc.org>
Wed, 21 Oct 2015 03:16:26 +0000 (20:16 -0700)
Squashed commit of the following:

commit 70bc20ffb6bd21793d2fb4f945ef9f16619df46f
Author: Shawn Routhier <sar@isc.org>
Date:   Tue Oct 20 12:18:01 2015 -0700

    [rt40990] Fix a memory leak in the v6 version of the client code

RELNOTES
client/dhc6.c

index 9d346ddd628d56bf0e13a36dd2a8e18aa51c988b..3eaa364c86d6714e6c058a00ab2d2f4ce7df0b39 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -102,7 +102,12 @@ by Eric Young (eay@cryptsoft.com).
   byte order to be used on a server with the opposite form.
   [ISC-Bugs #38396]
 
+- Fix a small memory leak in the DHCPv6 version of the client code.
+  This is unlikely to cause significant issues in actual use.
+  [ISC-Bugs #40990]
+
                        Changes since 4.1-ESV-R12b1
+
 - None
 
                        Changes since 4.1-ESV-R11
index d7def67683d8402b3e6e0ee3fcb59602c0eabc24..917677a6c17d955b806e8fb1403cee4e2d5da1c5 100644 (file)
@@ -478,6 +478,12 @@ valid_reply(struct packet *packet, struct client_state *client)
                rval = ISC_FALSE;
        }
 
+       /* clean up pointers to the strings */
+       if (sid.data != NULL)
+               data_string_forget(&sid, MDL);
+       if (cid.data != NULL)
+               data_string_forget(&cid, MDL);
+
        return rval;
 }