Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ionescu007/SimpleVisor.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'shvvp.c')
-rw-r--r--shvvp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/shvvp.c b/shvvp.c
index 1b34069..097b4bf 100644
--- a/shvvp.c
+++ b/shvvp.c
@@ -227,6 +227,8 @@ ShvVpLoadCallback (
PSHV_VP_DATA vpData;
INT32 status;
+ vpData = NULL;
+
//
// Detect if the hardware appears to support VMX root mode to start.
// No attempts are made to enable this if it is lacking or disabled.
@@ -261,7 +263,7 @@ ShvVpLoadCallback (
if (status != SHV_STATUS_SUCCESS)
{
//
- // Bail out
+ // Bail out, free the allocated per-processor data
//
goto Failure;
}
@@ -275,7 +277,6 @@ ShvVpLoadCallback (
//
// Free the per-processor data
//
- ShvVpFreeData(vpData, 1);
status = SHV_STATUS_NOT_PRESENT;
goto Failure;
}
@@ -290,6 +291,10 @@ Failure:
//
// Return failure
//
+ if (vpData != NULL)
+ {
+ ShvVpFreeData(vpData, 1);
+ }
Context->FailedCpu = ShvOsGetCurrentProcessorNumber();
Context->FailureStatus = status;
return;