aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@openvz.org>2010-04-05 20:56:57 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-30 09:30:09 -0700
commitfa8ad0257ea256381126ecf447694622216c600f (patch)
treed89c2ed6c0aa6b49fb9badc8d4132c6ddcd83b86
parent95beae90aa4afce57fb28e6f8238b78217bd7c98 (diff)
Staging: hv: Fix up memory leak on HvCleanup
Don't assign NULL too early Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Hank Janssen <hjanssen@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/hv/Hv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index 5d53889fb4a..3a1112d29ae 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -306,9 +306,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) {