From: Cyrill Gorcunov <gorcunov@openvz.org>
To: Greg KH <greg@kroah.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>,
Hank Janssen <hjanssen@microsoft.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] staging, hv: Fix up memory leak on HvCleanup
Date: Mon, 5 Apr 2010 20:56:57 +0400 [thread overview]
Message-ID: <20100405165657.GE5079@lenovo> (raw)
Don't assign NULL too early
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
drivers/staging/hv/Hv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.git/drivers/staging/hv/Hv.c
=====================================================================
--- linux-2.6.git.orig/drivers/staging/hv/Hv.c
+++ linux-2.6.git/drivers/staging/hv/Hv.c
@@ -305,9 +305,9 @@ void HvCleanup(void)
DPRINT_ENTER(VMBUS);
if (gHvContext.SignalEventBuffer) {
+ kfree(gHvContext.SignalEventBuffer);
gHvContext.SignalEventBuffer = NULL;
gHvContext.SignalEventParam = NULL;
- kfree(gHvContext.SignalEventBuffer);
}
if (gHvContext.HypercallPage) {
reply other threads:[~2010-04-05 16:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20100405165657.GE5079@lenovo \
--to=gorcunov@openvz.org \
--cc=greg@kroah.com \
--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
all inboxes | Powered by JetHome®