https://git.reactos.org/?p=reactos.git;a=commitdiff;h=aa80cfb46e8550c4dce2b…
commit aa80cfb46e8550c4dce2b3b212b199c752863510
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Mon Apr 18 16:22:30 2022 +0200
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Mon Apr 18 16:23:52 2022 +0200
[WIN32SS] Fix some memory leaks (introduced in
21ddeb76d91c851d95b6ab563517f5ee071b9848)
---
win32ss/gdi/eng/ldevobj.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/win32ss/gdi/eng/ldevobj.c b/win32ss/gdi/eng/ldevobj.c
index 0051a4c3842..cf618635735 100644
--- a/win32ss/gdi/eng/ldevobj.c
+++ b/win32ss/gdi/eng/ldevobj.c
@@ -596,11 +596,13 @@ LDEVOBJ_bBuildDevmodeList(
if (!pdminfo)
{
ERR("Could not allocate devmodeinfo\n");
+ ExFreePoolWithTag(pdm, GDITAG_DEVMODE);
continue;
}
pdminfo->cbdevmode = cbSize;
RtlCopyMemory(pdminfo->adevmode, pdm, cbSize);
+ ExFreePoolWithTag(pdm, GDITAG_DEVMODE);
/* Attach the mode info to the device */
pdminfo->pdmiNext = pGraphicsDevice->pdevmodeInfo;