This should do it for pen. Tested the same with wine tests.

svn path=/trunk/; revision=33858
This commit is contained in:
James Tabor 2008-06-04 21:05:18 +00:00
parent e61ef65c4a
commit 6378983897

View file

@ -177,11 +177,7 @@ IntGdiExtCreatePen(
ExitCleanup: ExitCleanup:
SetLastWin32Error(ERROR_INVALID_PARAMETER); SetLastWin32Error(ERROR_INVALID_PARAMETER);
if (PenObject->pStyle)
{
ExFreePool(PenObject->pStyle);
PenObject->pStyle = NULL; PenObject->pStyle = NULL;
}
PENOBJ_UnlockPen(PenObject); PENOBJ_UnlockPen(PenObject);
if (bOldStylePen) if (bOldStylePen)
PENOBJ_FreePenByHandle(hPen); PENOBJ_FreePenByHandle(hPen);
@ -343,7 +339,10 @@ NtGdiExtCreatePen(
cjDIB, cjDIB,
bOldStylePen, bOldStylePen,
hBrush); hBrush);
if (!hPen && pSafeStyle)
{
ExFreePool(pSafeStyle);
}
return hPen; return hPen;
} }