gdiplus: Simplify GdipResetImageAttributes(), fix remap table leak (Valgrind).

This commit is contained in:
Nikolay Sivov 2014-04-25 13:50:04 +04:00 committed by Alexandre Julliard
parent d68dde3751
commit e9633ef220
1 changed files with 3 additions and 4 deletions

View File

@ -279,11 +279,10 @@ GpStatus WINGDIPAPI GdipResetImageAttributes(GpImageAttributes *imageAttr,
if(!imageAttr || type >= ColorAdjustTypeCount)
return InvalidParameter;
memset(&imageAttr->colorkeys[type], 0, sizeof(imageAttr->colorkeys[type]));
memset(&imageAttr->colormatrices[type], 0, sizeof(imageAttr->colormatrices[type]));
memset(&imageAttr->colorremaptables[type], 0, sizeof(imageAttr->colorremaptables[type]));
memset(&imageAttr->gamma_enabled[type], 0, sizeof(imageAttr->gamma_enabled[type]));
memset(&imageAttr->gamma[type], 0, sizeof(imageAttr->gamma[type]));
GdipSetImageAttributesColorKeys(imageAttr, type, FALSE, 0, 0);
GdipSetImageAttributesRemapTable(imageAttr, type, FALSE, 0, NULL);
GdipSetImageAttributesGamma(imageAttr, type, FALSE, 0.0);
return Ok;
}