X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=cwmcc%2Fprop.c;fp=cwmcc%2Fprop.c;h=6e9e08126c976d4b72f7ab7725a969a566ef0478;hb=5cf61ee02354c1c9f80c11f3796afc4b948055d6;hp=b855c909106d3f6ff4d487088ba1fb5c44b1c9d4;hpb=fb1696659672386bcfc0f753b67f9eeda74e93b9;p=chaz%2Fopenbox 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; }