diff --git a/src/x11/meta-selection-source-x11.c b/src/x11/meta-selection-source-x11.c index 35451542b..a154b21af 100644 --- a/src/x11/meta-selection-source-x11.c +++ b/src/x11/meta-selection-source-x11.c @@ -155,7 +155,7 @@ atoms_to_mimetypes (MetaX11Display *display, for (i = 0; i < n_atoms; i++) { - const gchar *mimetype; + char *mimetype; meta_x11_error_trap_push (display); mimetype = XGetAtomName (xdisplay, atoms[i]); @@ -170,6 +170,8 @@ atoms_to_mimetypes (MetaX11Display *display, text_plain_found |= strcmp (mimetype, "text/plain") == 0; utf8_string_found |= strcmp (mimetype, "UTF8_STRING") == 0; string_found |= strcmp (mimetype, "STRING") == 0; + + XFree (mimetype); } /* Ensure non-x11 clients get well-known mimetypes */ diff --git a/src/x11/meta-x11-selection.c b/src/x11/meta-x11-selection.c index 0700fb506..66a1d1803 100644 --- a/src/x11/meta-x11-selection.c +++ b/src/x11/meta-x11-selection.c @@ -185,7 +185,7 @@ meta_x11_selection_find_target (MetaX11Display *x11_display, { Display *xdisplay = meta_x11_display_get_xdisplay (x11_display); GList* mimetypes = NULL; - const gchar *atom_name; + char *atom_name; char *retval; mimetypes = meta_selection_get_mimetypes (selection, selection_type); @@ -213,6 +213,7 @@ meta_x11_selection_find_target (MetaX11Display *x11_display, } g_list_free_full (mimetypes, g_free); + XFree (atom_name); return retval; }