Author: tkreuzer
Date: Thu May  1 09:59:01 2014
New Revision: 63091

URL: http://svn.reactos.org/svn/reactos?rev=63091&view=rev
Log:
[WIN32K]
When no clip object is passed to EngGradientFill, use the global trivial one 
instead of creating a new one. Fixes memory leak. CID 716615

Modified:
    trunk/reactos/win32ss/gdi/eng/gradient.c

Modified: trunk/reactos/win32ss/gdi/eng/gradient.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/gradient.c?rev=63091&r1=63090&r2=63091&view=diff
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/gradient.c    [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/gradient.c    [iso-8859-1] Thu May  1 
09:59:01 2014
@@ -487,13 +487,11 @@
     ULONG i;
     BOOL ret = FALSE;
 
-    if (!pco)
-    {
-        pco = IntEngCreateClipRegion(0, 0, prclExtents);
-        if (!pco)
-        {
-            return FALSE;
-        }
+    /* Check for NULL clip object */
+    if (pco == NULL)
+    {
+        /* Use the trivial one instead */
+        pco = &gxcoTrivial.ClipObj;
     }
 
     switch(ulMode)


Reply via email to