Plug a leak.

2007-03-10  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkdisplay-quartz.c: (gdk_display_get_name): Plug a leak.

svn path=/trunk/; revision=17461
This commit is contained in:
Richard Hult 2007-03-10 21:04:05 +00:00 committed by Richard Hult
parent 5b14b85c3a
commit feabd0d76d
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2007-03-10 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkdisplay-quartz.c: (gdk_display_get_name): Plug a leak.
2007-03-10 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzView.c: Remove unneccesary exposure mask check.

View File

@ -75,8 +75,12 @@ gdk_display_get_name (GdkDisplay *display)
{
static gchar *display_name = NULL;
if (! display_name)
display_name = g_strdup ([[[NSHost currentHost] name] UTF8String]);
if (!display_name)
{
GDK_QUARTZ_ALLOC_POOL;
display_name = g_strdup ([[[NSHost currentHost] name] UTF8String]);
GDK_QUARTZ_RELEASE_POOL;
}
return display_name;
}