From: Cyrill Gorcunov Date: Mon, 5 Apr 2010 16:56:57 +0000 (+0400) Subject: Staging: hv: Fix up memory leak on HvCleanup X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fa8ad0257ea256381126ecf447694622216c600f;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Staging: hv: Fix up memory leak on HvCleanup Don't assign NULL too early Signed-off-by: Cyrill Gorcunov Cc: Hank Janssen Cc: Haiyang Zhang Cc: stable Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c index 5d53889fb4a4..3a1112d29aeb 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) {