diff options
author | Laszlo Ersek <lersek@redhat.com> | 2013-11-20 22:31:14 +0000 |
---|---|---|
committer | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-11-20 22:31:14 +0000 |
commit | 5cdb96fa0d5f689cb4b3b17ddd2cec164842aebd (patch) | |
tree | 2a3ac7940ca393fd7b18e961467247be9fa2a603 | |
parent | a93b0f45492e1d72352cbee73b6cc3819128d9d4 (diff) | |
download | edk2-platforms-5cdb96fa0d5f689cb4b3b17ddd2cec164842aebd.tar.xz |
OvmfPkg/QemuVideoDxe: don't leak descriptors returned by GetBarAttributes
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14877 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | OvmfPkg/QemuVideoDxe/Driver.c | 4 | ||||
-rw-r--r-- | OvmfPkg/QemuVideoDxe/Gop.c | 1 |
2 files changed, 5 insertions, 0 deletions
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;
}
|