[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1489445829-15292-1-git-send-email-kys@exchange.microsoft.com>
Date: Mon, 13 Mar 2017 15:57:09 -0700
From: kys@...hange.microsoft.com
To: gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
devel@...uxdriverproject.org, olaf@...fle.de, apw@...onical.com,
vkuznets@...hat.com, jasowang@...hat.com,
leann.ogasawara@...onical.com, marcelo.cerri@...onical.com
Cc: "K. Y. Srinivasan" <kys@...rosoft.com>, <stable@...r.kernel.org>
Subject: [PATCH 1/1] Drivers: hv: vmbus: Don't leak channel ids
From: K. Y. Srinivasan <kys@...rosoft.com>
If we cannot allocate memory for the channel, free the relid
associated with the channel.
Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>
Cc: <stable@...r.kernel.org>
---
drivers/hv/channel_mgmt.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index e1a3ae4..0a85246 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -802,6 +802,7 @@ static void vmbus_onoffer(struct vmbus_channel_message_header *hdr)
/* Allocate the channel object and save this offer. */
newchannel = alloc_channel();
if (!newchannel) {
+ vmbus_release_relid(offer->child_relid);
pr_err("Unable to allocate channel object\n");
return;
}
--
1.7.1
Powered by blists - more mailing lists