diff --git a/src/x11/xprops.c b/src/x11/xprops.c index 7b28cc8a9..f50709a3b 100644 --- a/src/x11/xprops.c +++ b/src/x11/xprops.c @@ -438,8 +438,7 @@ utf8_string_from_results (GetPropertyResults *results, return FALSE; } - *str_p = (char*) results->prop; - results->prop = NULL; + *str_p = g_strndup ((char *) results->prop, results->n_items); return TRUE; }