From 6221c95d482e6111ffe8fffdde1b832192c00d8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 8 Jun 2015 20:17:07 +0100 Subject: [PATCH] ximagesink, xvimagesink: fix string leaks when setting class hint https://bugzilla.gnome.org/show_bug.cgi?id=750455 --- sys/ximage/ximagesink.c | 4 ++-- sys/xvimage/xvcontext.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index 328a617e12..126e3cb75f 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -406,8 +406,8 @@ gst_ximagesink_xwindow_set_title (GstXImageSink * ximagesink, } if (hint) { - hint->res_name = g_strdup (app_name); - hint->res_class = g_strdup ("GStreamer"); + hint->res_name = (char *) app_name; + hint->res_class = (char *) "GStreamer"; XSetClassHint (ximagesink->xcontext->disp, xwindow->win, hint); } XFree (hint); diff --git a/sys/xvimage/xvcontext.c b/sys/xvimage/xvcontext.c index b04a49cacc..1af70b24da 100644 --- a/sys/xvimage/xvcontext.c +++ b/sys/xvimage/xvcontext.c @@ -1087,8 +1087,8 @@ gst_xwindow_set_title (GstXWindow * window, const gchar * title) XFree (xproperty.value); if (hint) { - hint->res_name = g_strdup (title); - hint->res_class = g_strdup ("GStreamer"); + hint->res_name = (char *) title; + hint->res_class = (char *) "GStreamer"; XSetClassHint (context->disp, window->win, hint); } XFree (hint);