Commit 69b335b5 authored by Fabian Maurer's avatar Fabian Maurer Committed by Alexandre Julliard

wineps: Don't leak memory in error case (Coverity).

parent 1d412eac
...@@ -985,6 +985,12 @@ BOOL PSDRV_WriteDIBPatternDict(print_ctx *ctx, const BITMAPINFO *bmi, BYTE *bits ...@@ -985,6 +985,12 @@ BOOL PSDRV_WriteDIBPatternDict(print_ctx *ctx, const BITMAPINFO *bmi, BYTE *bits
return FALSE; return FALSE;
} }
if (usage > 2)
{
FIXME("wrong usage: %d\n", usage);
return FALSE;
}
w = bmi->bmiHeader.biWidth; w = bmi->bmiHeader.biWidth;
h = abs_height; h = abs_height;
...@@ -1025,11 +1031,7 @@ BOOL PSDRV_WriteDIBPatternDict(print_ctx *ctx, const BITMAPINFO *bmi, BYTE *bits ...@@ -1025,11 +1031,7 @@ BOOL PSDRV_WriteDIBPatternDict(print_ctx *ctx, const BITMAPINFO *bmi, BYTE *bits
map[0] = GetTextColor( ctx->hdc ); map[0] = GetTextColor( ctx->hdc );
map[1] = GetBkColor( ctx->hdc ); map[1] = GetBkColor( ctx->hdc );
} }
else
{
FIXME("wrong usage: %d\n", usage);
return FALSE;
}
PSDRV_WriteRGB(ctx, map, 2); PSDRV_WriteRGB(ctx, map, 2);
PSDRV_WriteIndexColorSpaceEnd(ctx); PSDRV_WriteIndexColorSpaceEnd(ctx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment