Bug in gdkwindow.c?



Hello,

I'm using GTK+ 1.0.4 from Debian Hamm 2.0.
I'm not familiar with internals of GTK and don't have the time to
check out how to handle the CVS repository.  But I think I've
found a bug and hope someone can forward it to the right place.

I tried to debug a selfmade program using gdb and dmalloc.  My program
stoped (only in this debugging suite not normally!!) in 
    gdkwindow.c: gdk_window_foreign_new ()
after line
  XQueryTree (gdk_display, anid, &root, &parent, &children, &nchildren);
  XFree (children);
Obviously it is possible, that XQueryTree() returns children == NULL
(I havn't any idea what XFree is good for ...) and XFree trys to
free a NULL-pointer.  In my opinion there should be a

  if (children) XFree(children);

to avoid this error.  In my opinion it is important also if the
program normally don't stop at this place.

Moreover dmalloc reports lots of not freed memory (not from my own
code).  Are thgere any investigations to correct this?

Kind regards

        Andreas.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]