]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[master] Fix a memory leak in the v6 version of the client code
authorShawn Routhier <sar@isc.org>
Wed, 21 Oct 2015 03:08:05 +0000 (20:08 -0700)
committerShawn Routhier <sar@isc.org>
Wed, 21 Oct 2015 03:08:05 +0000 (20:08 -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 e6b1a5f2ad199f15a18cacaba793fb9f23645e07..d5179f2093dddcff395f6b80fcdccd35124b8d8c 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -103,6 +103,10 @@ by Eric Young (eay@cryptsoft.com).
   he provided.
   [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.3.3b1
 - None
 
index 41c27f469b565a10fa49ba910b50c5a448dc2b30..37ce739460ff612c80b66d38161f018eab13f253 100644 (file)
@@ -418,6 +418,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;
 }