xprop leaks
Looks like a long running xprop process leaks. Unfortunately pulseaudio
is using xprop -root -spy to determine when to terminate a running
pulseaudio session daemon. So after ~40 days, I have an xprop process
with about 400mb rss.
The attached should fix the xprop leaks.
Colin
--- xprop.c~ 2013-08-14 16:32:43.000000000 -0600
+++ xprop.c 2014-08-06 11:51:06.490793708 -0600
@@ -95,13 +95,11 @@ Create_Thunk_List (void)
return tptr;
}
-#ifdef notused
static void
Free_Thunk_List (thunk *list)
{
free(list);
}
-#endif
static thunk *
Add_Thunk (thunk *list, thunk t)
@@ -1508,6 +1506,10 @@ Show_Prop (const char *format, const cha
thunks = Break_Down_Property(data, (int)length, type, format, size);
Display_Property(thunks, dformat, format);
+
+ Free_Thunk_List(thunks);
+ if (data)
+ XFree(data);
}
static void
@@ -1523,6 +1525,8 @@ Show_All_Props (void)
name = Format_Atom(atoms[i]);
Show_Prop(NULL, NULL, name);
}
+ if (atoms)
+ XFree(atoms);
} else
for (i = 0; i < font->n_properties; i++) {
atom = font->properties[i].name;
Reply to: