From 18ba0ff38c78a8b46a552fcdd90c6a072554f34f Mon Sep 17 00:00:00 2001 From: Shawn Routhier Date: Tue, 20 Oct 2015 20:08:05 -0700 Subject: [PATCH] [master] Fix a memory leak in the v6 version of the client code Squashed commit of the following: commit 70bc20ffb6bd21793d2fb4f945ef9f16619df46f Author: Shawn Routhier Date: Tue Oct 20 12:18:01 2015 -0700 [rt40990] Fix a memory leak in the v6 version of the client code --- RELNOTES | 4 ++++ client/dhc6.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/RELNOTES b/RELNOTES index e6b1a5f2..d5179f20 100644 --- 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 diff --git a/client/dhc6.c b/client/dhc6.c index 41c27f46..37ce7394 100644 --- a/client/dhc6.c +++ b/client/dhc6.c @@ -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; }