The problem is with _nxAddProperty function in the way is creates linked lists of windows and properties. The first window/property is not tested correctly and it is duplicated, and when deletion is performed, the duplication is removed but not the original and leak occurs.
Also, using XGetAtomName inside printf causes another leak because the return string is allocated (strdup) on heap and never released. There is nothing wrong in Atom.c The patch for ChProperty.c is: --- ChProperty.c.org 2002-09-21 22:52:29.000000000 +0000 +++ ChProperty.c 2007-11-15 12:49:27.000000000 +0000 @@ -30,12 +30,13 @@ (struct windows *) Xcalloc(sizeof(struct windows), 1); } else { struct windows *t = window_list[hash]; - while (t->next) { + for (;;) { if (t->w == w) { win = t; break; } - + if (t->next == NULL) + break; t = t->next; } @@ -44,17 +45,19 @@ (struct windows *) Xcalloc(sizeof(struct windows), 1); } + win->w = w; if (!win->properties) prop = win->properties = (struct window_props *) Xcalloc(sizeof(struct window_props), 1); else { struct window_props *t = win->properties; - while (t->next) { + for (;;) { if (t->property == property) { prop = t; break; } - + if (t->next == NULL) + break; t = t->next; } @@ -176,7 +179,6 @@ Atom type, int format, int mode, _Xconst unsigned char *data, int nelements) { -printf("XChangeProperty %s\n", XGetAtomName(display, property)); return _nxAddProperty(w, property, type, format, mode, data, nelements); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]