- IntEmptyClipboardData: Check before freeing a potential null pointer
authorStefan Ginsberg <stefanginsberg@gmail.com>
Wed, 27 May 2009 16:39:24 +0000 (16:39 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Wed, 27 May 2009 16:39:24 +0000 (16:39 +0000)
svn path=/trunk/; revision=41143

reactos/subsystems/win32/win32k/ntuser/clipboard.c

index 49635f7..a5dbb06 100644 (file)
@@ -229,7 +229,10 @@ IntEmptyClipboardData()
     while(ce)
     {
         tmp = ce->next;
-        ExFreePool(ce->hData);
+               if (ce->hData)
+               {
+            ExFreePool(ce->hData);
+        }
            ExFreePool(ce);
            ce = tmp;
     }