From mboxrd@z Thu Jan 1 00:00:00 1970 From: jtc@redback.com (J.T. Conklin) To: "John R. Moore" Cc: Kevin Buettner , Subject: Re: xfree() -- set ptr to nil (fwd) Date: Mon, 12 Feb 2001 15:54:00 -0000 Message-id: <5mofw71mqo.fsf@jtc.redback.com> References: X-SW-Source: 2001-02/msg00184.html >>>>> "John" == John R Moore writes: John> Yes, I've usually seen this as a macro John> John> #define XFREE(ptr) do \ John> { \ John> if (ptr) \ John> { \ John> free (ptr); \ John> ptr = NULL; \ John> } \ John> } while (0) John> John> Ok, then, do we want to replace xfree() with something like XFREE() ? I'd say no, unless it has been established that we have a problem where pointers are freed multiple times AND it's been determined that its too difficult to fix the code to avoid the bug. --jtc -- J.T. Conklin RedBack Networks