From: Cyrill Gorcunov Date: Mon, 5 Apr 2010 16:56:57 +0000 (+0400) Subject: Staging: hv: Fix up memory leak on HvCleanup X-Git-Tag: v2.6.33.4~79 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6f84f123139b79420bb384467da38613504f2675;p=karo-tx-linux.git Staging: hv: Fix up memory leak on HvCleanup commit fa8ad0257ea256381126ecf447694622216c600f upstream. Don't assign NULL too early Signed-off-by: Cyrill Gorcunov Cc: Hank Janssen Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c index c2809f2a2ce0..b12237f90db2 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.GuestId == HV_LINUX_GUEST_ID) {