X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=cwmcc%2Fprop.c;h=6e9e08126c976d4b72f7ab7725a969a566ef0478;hb=00960995a291c32d56bf3ab1eeae4e24af54be5c;hp=b855c909106d3f6ff4d487088ba1fb5c44b1c9d4;hpb=fd5784c082de724b9ccde01977eac1e27a121201;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; }