diff --git a/OvmfPkg/QemuVideoDxe/Driver.c b/OvmfPkg/QemuVideoDxe/Driver.c index 1dd8899fcf..53718e1aea 100644 --- a/OvmfPkg/QemuVideoDxe/Driver.c +++ b/OvmfPkg/QemuVideoDxe/Driver.c @@ -305,6 +305,10 @@ QemuVideoControllerDriverStart ( DEBUG ((EFI_D_INFO, "QemuVideo: Using mmio bar @ 0x%lx\n", MmioDesc->AddrRangeMin)); } + + if (!EFI_ERROR (Status)) { + FreePool (MmioDesc); + } } // diff --git a/OvmfPkg/QemuVideoDxe/Gop.c b/OvmfPkg/QemuVideoDxe/Gop.c index 1d2402cded..30aac7f95f 100644 --- a/OvmfPkg/QemuVideoDxe/Gop.c +++ b/OvmfPkg/QemuVideoDxe/Gop.c @@ -72,6 +72,7 @@ QemuVideoCompleteModeData ( Mode->FrameBufferSize = Mode->FrameBufferSize * ((ModeData->ColorDepth + 7) / 8); DEBUG ((EFI_D_INFO, "FrameBufferBase: 0x%x, FrameBufferSize: 0x%x\n", Mode->FrameBufferBase, Mode->FrameBufferSize)); + FreePool (FrameBufDesc); return EFI_SUCCESS; }