gdiplus/tests: Don't free if alloc failed.