From: Andre Bartke <andre.bartke@googlemail.com>
To: gregkh@suse.de
Cc: hjanssen@microsoft.com, haiyangz@microsoft.com,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Andre Bartke <andre.bartke@gmail.com>
Subject: [PATCH] staging/hv: Fix memory leak of storvsc_dev_add()
Date: Tue, 31 May 2011 23:45:52 +0200 [thread overview]
Message-ID: <1306878352-14450-1-git-send-email-andre.bartke@gmail.com> (raw)
stor_device is not freed in storvsc_dev_add()
causing a memory leak in case of an allocation error.
Signed-off-by: Andre Bartke <andre.bartke@gmail.com>
---
drivers/staging/hv/storvsc.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c
index 06cd327..92b44f4 100644
--- a/drivers/staging/hv/storvsc.c
+++ b/drivers/staging/hv/storvsc.c
@@ -414,6 +414,7 @@ int storvsc_dev_add(struct hv_device *device,
device_info->target_id = stor_device->target_id;
cleanup:
+ free_stor_device(stor_device);
return ret;
}
--
1.7.5.2
next reply other threads:[~2011-05-31 21:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-31 21:45 Andre Bartke [this message]
2011-06-01 12:28 ` [PATCH] staging/hv: Fix memory leak of storvsc_dev_add() KY Srinivasan
2011-06-01 16:32 ` Andre Bartke
2011-06-01 18:03 ` KY Srinivasan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1306878352-14450-1-git-send-email-andre.bartke@gmail.com \
--to=andre.bartke@googlemail.com \
--cc=andre.bartke@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=haiyangz@microsoft.com \
--cc=hjanssen@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox