Esme Povirk (@madewokherd) commented about dlls/gdiplus/image.c:
{ ef = malloc(sizeof(CGpEffect)); ef->type = ColorBalanceEffect;
} else if (IsEqualGUID(&guid, &LevelsEffectGuid)) { ef = malloc(sizeof(CGpEffect)); ef->type = LevelsEffect;ef->p.clrbalanceparams = NULL;
} else if (IsEqualGUID(&guid, &ColorCurveEffectGuid)) { ef = malloc(sizeof(CGpEffect)); ef->type = ColorCurveEffect;ef->p.levelsparams = NULL;
ef->p.clrcurveparams = NULL;
I don't think it makes sense to duplicate this assignment to NULL. I would just have a member of the union that is a BYTE* and use that when the type doesn't matter.