From: H. Peter Anvin Date: Wed, 12 Oct 2005 04:40:37 GMT Subject: Re: [RFC] Cleaning up die() error messages Message-ID: <434C93C5.9040505@zytor.com> In-Reply-To: <7vd5mbqs2x.fsf@assigned-by-dhcp.cox.net> Junio C Hamano wrote: > "H. Peter Anvin" writes: > >>I thought about this, and probably the sanest way is to wrap malloc() >>with something that creates a linked list of allocations. If we abort, >>we can unwind the linked list and free all allocations. > > You can free() the allocated memory with something like that, > but it is likely that the aborted function would have already > created some linked structure out of those memory blocks, and > cleaning up that you would need the real exception handling > wouldn't you? > Not unless any of those linked structures can be reached from outside the git library. -hpa