From 8650eac76cd554b46e222ec63dd78698dd51c29d Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 9 Sep 2023 10:41:27 +0300 Subject: [PATCH] [WIN32K] Do not try to free a unicode string that is an int-resource --- win32ss/user/ntuser/cursoricon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/win32ss/user/ntuser/cursoricon.c b/win32ss/user/ntuser/cursoricon.c index 80a15a39b09..bb72ffcdfba 100644 --- a/win32ss/user/ntuser/cursoricon.c +++ b/win32ss/user/ntuser/cursoricon.c @@ -1665,7 +1665,8 @@ Exit: /* Additional cleanup on failure */ if (bResult == FALSE) { - if (ustrRsrc.Buffer != NULL) + if ((ustrRsrc.Buffer != NULL) && + !IS_INTRESOURCE(ustrRsrc.Buffer)) { ExFreePoolWithTag(ustrRsrc.Buffer, TAG_STRING); }