[ros-diffs] [cwittich] 34098: don't free a UNICODE_STRING which isn't allocated

cwittich at svn.reactos.org cwittich at svn.reactos.org
Thu Jun 26 14:20:10 CEST 2008


Author: cwittich
Date: Thu Jun 26 07:20:09 2008
New Revision: 34098

URL: http://svn.reactos.org/svn/reactos?rev=34098&view=rev
Log:
don't free a UNICODE_STRING which isn't allocated

Modified:
    trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c?rev=34098&r1=34097&r2=34098&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] Thu Jun 26 07:20:09 2008
@@ -931,7 +931,8 @@
    {
       SetLastNtError(STATUS_INSUFFICIENT_RESOURCES);
       ObDereferenceObject(WinStaObject);
-      RtlFreeUnicodeString(&SafeDesktopName);
+	  if (lpszDesktopName)
+         RtlFreeUnicodeString(&SafeDesktopName);
       RETURN( NULL);
    }
    RtlFreeUnicodeString(&SafeDesktopName);



More information about the Ros-diffs mailing list