From c47cb3018d02d3bf1e648300c8e06e28212e7ccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C3=85strand?= Date: Mon, 18 Jan 2010 10:06:54 +0000 Subject: [PATCH] Since the backing store is created in ui_create_window, free it in ui_destroy_window, for symmetry. This is also necessary when reconnecting with a different size, since the backing store size needs to be changed. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1555 423420c4-83ab-492f-b58f-81f9feb106b5 --- xwin.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xwin.c b/xwin.c index a87568f..52e2f78 100644 --- a/xwin.c +++ b/xwin.c @@ -1962,9 +1962,6 @@ ui_deinit(void) XFreeModifiermap(g_mod_map); - if (g_ownbackstore) - XFreePixmap(g_display, g_backstore); - XFreeGC(g_display, g_gc); XCloseDisplay(g_display); g_display = NULL; @@ -2160,6 +2157,12 @@ ui_destroy_window(void) XDestroyWindow(g_display, g_wnd); g_wnd = 0; + + if (g_backstore) + { + XFreePixmap(g_display, g_backstore); + g_backstore = 0; + } } void