summaryrefslogtreecommitdiff
path: root/xprop.c
diff options
context:
space:
mode:
Diffstat (limited to 'xprop.c')
-rw-r--r--xprop.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xprop.c b/xprop.c
index 795cedd..e7a66d9 100644
--- a/xprop.c
+++ b/xprop.c
@@ -750,10 +750,14 @@ is_utf8_locale (void)
static const char *
Format_Icons (const unsigned long *icon, int len)
{
- char *result = NULL, *tail = NULL;
+ static char *result = NULL;
+ char *tail = NULL;
int alloced;
const unsigned long *end = icon + len / sizeof (unsigned long);
+ free(result);
+ result = NULL;
+
alloced = 0;
while (icon < end)