From 9e88dd4372efdd744f8ad6e282436dfd1a61c393 Mon Sep 17 00:00:00 2001 From: Arnaud Fontaine Date: Wed, 9 Apr 2008 15:12:15 +0100 Subject: [PATCH] [client] Fix xcb_get_wm_normal_hints() which now returns an allocated pointer --- client.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client.c b/client.c index d0031b80..2499947d 100644 --- a/client.c +++ b/client.c @@ -705,7 +705,7 @@ client_updatewmhints(Client *c) c->border = 0; c->skip = true; } - free(wmh); + xcb_free_wm_hints(wmh); } } @@ -713,10 +713,9 @@ xcb_size_hints_t * client_updatesizehints(Client *c) { long msize; - xcb_size_hints_t *size = xcb_alloc_size_hints(); + xcb_size_hints_t *size = NULL; - if(!xcb_get_wm_normal_hints(globalconf.connection, c->win, size, &msize) || - size == NULL) + if(!(size = xcb_get_wm_normal_hints(globalconf.connection, c->win, &msize))) return NULL; if(xcb_size_hints_is_p_size(size))