summaryrefslogtreecommitdiff
path: root/xprop.c
diff options
context:
space:
mode:
Diffstat (limited to 'xprop.c')
-rw-r--r--xprop.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/xprop.c b/xprop.c
index 7d20ca1..795cedd 100644
--- a/xprop.c
+++ b/xprop.c
@@ -1423,9 +1423,15 @@ Get_Window_Property_Data_And_Type (Atom atom,
unsigned long nitems;
unsigned long nbytes;
unsigned long bytes_after;
- unsigned char *prop;
+ static unsigned char *prop = NULL;
int status;
-
+
+ if (prop)
+ {
+ XFree(prop);
+ prop = NULL;
+ }
+
status = XGetWindowProperty(dpy, target_win, atom, 0, (max_len+3)/4,
False, AnyPropertyType, &actual_type,
&actual_format, &nitems, &bytes_after,