https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8650eac76cd554b46e222ec63dd78698dd51c29d

commit 8650eac76cd554b46e222ec63dd78698dd51c29d
Author:     Timo Kreuzer <[email protected]>
AuthorDate: Sat Sep 9 10:41:27 2023 +0300
Commit:     Timo Kreuzer <[email protected]>
CommitDate: Sun Sep 17 10:40:19 2023 +0300

    [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);
         }

Reply via email to