--- /home/zimmer/xfree4.2.0/xc/lib/X11/PolyReg.c 2001-12-14 20:54:03.000000000 +0100 +++ /home/gern/xfree/PolyReg.c 2004-04-19 11:09:56.000000000 +0200 @@ -409,7 +409,10 @@ if (!(reg->rects = (BOX *)Xrealloc((char *)reg->rects, (unsigned) (sizeof(BOX) * numRects)))) { - Xfree(prevRects); + if (numRects != 0) { + Xfree(prevRects); + } + reg->size = 0; return(0); }