mirror of https://github.com/FreeRDP/FreeRDP
Replace malloc by xmalloc calls
This commit is contained in:
parent
06491e02cf
commit
de3a6b6070
|
@ -67,7 +67,7 @@ wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, uint8* data)
|
|||
wfBitmap* image;
|
||||
|
||||
hdc = GetDC(NULL);
|
||||
image = (wfBitmap*) malloc(sizeof(wfBitmap));
|
||||
image = (wfBitmap*) xmalloc(sizeof(wfBitmap));
|
||||
image->hdc = CreateCompatibleDC(hdc);
|
||||
|
||||
if (data == NULL)
|
||||
|
@ -87,7 +87,7 @@ wfBitmap* wf_bitmap_new(wfInfo* wfi, int width, int height, int bpp, uint8* data
|
|||
wfBitmap* bitmap;
|
||||
|
||||
hdc = GetDC(NULL);
|
||||
bitmap = (wfBitmap*) malloc(sizeof(wfBitmap));
|
||||
bitmap = (wfBitmap*) xmalloc(sizeof(wfBitmap));
|
||||
bitmap->hdc = CreateCompatibleDC(hdc);
|
||||
bitmap->bitmap = wf_create_dib(wfi, width, height, bpp, data, &(bitmap->pdata));
|
||||
bitmap->org_bitmap = (HBITMAP) SelectObject(bitmap->hdc, bitmap->bitmap);
|
||||
|
|
|
@ -296,12 +296,12 @@ boolean wf_post_connect(freerdp* instance)
|
|||
wfi->hdc->alpha = wfi->clrconv->alpha;
|
||||
wfi->hdc->invert = wfi->clrconv->invert;
|
||||
|
||||
wfi->hdc->hwnd = (HGDI_WND) malloc(sizeof(GDI_WND));
|
||||
wfi->hdc->hwnd = (HGDI_WND) xmalloc(sizeof(GDI_WND));
|
||||
wfi->hdc->hwnd->invalid = gdi_CreateRectRgn(0, 0, 0, 0);
|
||||
wfi->hdc->hwnd->invalid->null = 1;
|
||||
|
||||
wfi->hdc->hwnd->count = 32;
|
||||
wfi->hdc->hwnd->cinvalid = (HGDI_RGN) malloc(sizeof(GDI_RGN) * wfi->hdc->hwnd->count);
|
||||
wfi->hdc->hwnd->cinvalid = (HGDI_RGN) xmalloc(sizeof(GDI_RGN) * wfi->hdc->hwnd->count);
|
||||
wfi->hdc->hwnd->ninvalid = 0;
|
||||
|
||||
wfi->image = wf_bitmap_new(wfi, 64, 64, 32, NULL);
|
||||
|
|
Loading…
Reference in New Issue