Bug#256954: frees wrong memory
On Thu, Jul 01, 2004 at 12:56:38AM +0200, Denis Barbier wrote:
> On Tue, Jun 29, 2004 at 09:38:13PM -0700, Matt Kraai wrote:
> > I think the read fails because the other end of the pipe closes
> > because cdebconf crashes because of a bug in
> > question_owner_delete: if the owner that it is trying to delete is
> > not last one in the list, it frees the owner field.
> > The attached, untested patch should fix it, but I'd appreciate a
> > review.
> It seems that the question_owner_delete routine is intended to remove
> an entry from a single chained list. AFAICT the current implementation
> as well as your patch do not preserve links when the removed item is
> not in list tail. Here is another patch, not tested.
With the patch I submitted, if the item that is removed is not at
the end of the list, the pointer to it will be changed to point to
the item after it and it will then be deleted. Would you please
explain why this won't work?
Matt Kraai email@example.com http://ftbfs.org/