diff options
Diffstat (limited to 'cwmcc/prop.c')
| -rw-r--r-- | cwmcc/prop.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cwmcc/prop.c b/cwmcc/prop.c index b855c909..6e9e0812 100644 --- a/cwmcc/prop.c +++ b/cwmcc/prop.c @@ -84,9 +84,7 @@ static gboolean get_all(Window win, Atom prop, Atom type, int size, &ret_items, &bytes_left, &xdata); if (res == Success) { if (ret_size == size && ret_items > 0) { - *data = g_malloc(ret_items * (size / 8) + sizeof(guchar*)); - g_memmove(*data, xdata, ret_items * (size / 8)); - data[ret_items * (size / 8)] = NULL; + *data = g_memdup(xdata, ret_items * (size / 8)); *num = ret_items; ret = TRUE; } |
