From aa80cfb46e8550c4dce2b3b212b199c752863510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Mon, 18 Apr 2022 16:22:30 +0200 Subject: [PATCH] [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;