summaryrefslogtreecommitdiffstats
path: root/common/gdi_canvas.c
diff options
context:
space:
mode:
authorIzik Eidus <ieidus@redhat.com>2010-04-05 22:57:37 +0300
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-03-20 15:25:41 +0100
commitc442c54c5173a09ac3040a983867ad2cdebe06a2 (patch)
treea7fd153ac2e184ce70b6f1c1c947f3fd9c4e0893 /common/gdi_canvas.c
parente66440d5637e4ac6bf4cf3b20cd73465ee812aba (diff)
downloadspice-common-c442c54c5173a09ac3040a983867ad2cdebe06a2.tar.gz
spice-common-c442c54c5173a09ac3040a983867ad2cdebe06a2.tar.xz
spice-common-c442c54c5173a09ac3040a983867ad2cdebe06a2.zip
spice: common: gdi_canvas fix gdi objects leak
BitmapMask was used by the draw_text function as well therefore we need to mark from_surface = 0 if we want it to release the boject... (Was evil, took me few hours to understand from where the leak come...) Signed-off-by: Izik Eidus <ieidus@redhat.com>
Diffstat (limited to 'common/gdi_canvas.c')
-rw-r--r--common/gdi_canvas.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/gdi_canvas.c b/common/gdi_canvas.c
index 75dff69..4362b38 100644
--- a/common/gdi_canvas.c
+++ b/common/gdi_canvas.c
@@ -918,6 +918,7 @@ static void draw_str_mask_bitmap(struct GdiCanvas *canvas,
return;
}
+ bitmap.from_surface = 0;
bitmap.cache = 0;
bitmap_data = create_bitmap(&bitmap.hbitmap, &bitmap.prev_hbitmap,
&bitmap.dc, NULL,