projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a16dfc
)
Drivers: hv: vmbus: Don't leak channel ids
author
K. Y. Srinivasan
<kys@microsoft.com>
Mon, 13 Mar 2017 22:57:09 +0000
(15:57 -0700)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 16 Mar 2017 07:42:33 +0000
(16:42 +0900)
If we cannot allocate memory for the channel, free the relid
associated with the channel.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/channel_mgmt.c
patch
|
blob
|
history
diff --git
a/drivers/hv/channel_mgmt.c
b/drivers/hv/channel_mgmt.c
index
bf846d0
..
fbcb063
100644
(file)
--- a/
drivers/hv/channel_mgmt.c
+++ b/
drivers/hv/channel_mgmt.c
@@
-796,6
+796,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;
}