ximagesink, xvimagesink: fix string leaks when setting class hint

https://bugzilla.gnome.org/show_bug.cgi?id=750455
This commit is contained in:
Tim-Philipp Müller 2015-06-08 20:17:07 +01:00
parent cb49acf158
commit 6221c95d48
2 changed files with 4 additions and 4 deletions

View file

@ -406,8 +406,8 @@ gst_ximagesink_xwindow_set_title (GstXImageSink * ximagesink,
} }
if (hint) { if (hint) {
hint->res_name = g_strdup (app_name); hint->res_name = (char *) app_name;
hint->res_class = g_strdup ("GStreamer"); hint->res_class = (char *) "GStreamer";
XSetClassHint (ximagesink->xcontext->disp, xwindow->win, hint); XSetClassHint (ximagesink->xcontext->disp, xwindow->win, hint);
} }
XFree (hint); XFree (hint);

View file

@ -1087,8 +1087,8 @@ gst_xwindow_set_title (GstXWindow * window, const gchar * title)
XFree (xproperty.value); XFree (xproperty.value);
if (hint) { if (hint) {
hint->res_name = g_strdup (title); hint->res_name = (char *) title;
hint->res_class = g_strdup ("GStreamer"); hint->res_class = (char *) "GStreamer";
XSetClassHint (context->disp, window->win, hint); XSetClassHint (context->disp, window->win, hint);
} }
XFree (hint); XFree (hint);