*** Base/ppmdraw.c 2007-01-08 16:49:17.000000000 +0100 --- ./ppmdraw.c 2007-01-09 14:54:41.000000000 +0100 *************** *** 331,340 **** static void freeScript(struct script * const scriptP) { ! struct commandListElt * p; ! for (p = scriptP->commandListHeadP; p; p = p->nextP) { freeDrawCommand(p->commandP); free(p); } --- 331,341 ---- static void freeScript(struct script * const scriptP) { ! struct commandListElt * p, * np; ! for (p = scriptP->commandListHeadP; p; p = np) { freeDrawCommand(p->commandP); + np = p->nextP; free(p); }