Skip to content

Commit

Permalink
Staging: hv: Fix up memory leak on HvCleanup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Cyrill Gorcunov authored and Greg Kroah-Hartman committed Apr 30, 2010
1 parent 95beae9 commit fa8ad02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/hv/Hv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fa8ad02

Please sign in to comment.