ui/common: Free message on return
[petitboot] / ui / twin / pbt-scr.c
index e093c3c66b13fcc28defaa3d8b882a3d8d746511..b774f194693932572f7d1e23db9ebc7cb306f05e 100644 (file)
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#if defined(HAVE_CONFIG_H)
 #include "config.h"
-#define _GNU_SOURCE
+#endif
+
 #include <assert.h>
 
 #include <string.h>
@@ -361,7 +363,7 @@ static int pbt_twin_waiter_cb(struct pbt_twin_ctx *twin_ctx)
 
 static void pbt_scr_destructor(struct pbt_scr *scr)
 {
-       pb_log("%s\n", __func__);
+       pb_debug("%s\n", __func__);
 
        twin_x11_destroy(scr->twin_ctx.x11);
        // FIXME: need cursor cleanup???
@@ -409,7 +411,7 @@ struct pbt_scr *pbt_scr_init(void *talloc_ctx,
                        goto fail_ctx_create;
                }
 
-               pb_log("%s: x11: %p\n", __func__, scr->twin_ctx.x11);
+               pb_debug("%s: x11: %p\n", __func__, scr->twin_ctx.x11);
 
                assert(scr->twin_ctx.x11->screen);
                scr->tscreen = scr->twin_ctx.x11->screen;