[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: memory leak in pflocal
From: |
Marcus Brinkmann |
Subject: |
Re: memory leak in pflocal |
Date: |
Sun, 11 Feb 2001 21:21:25 +0100 |
User-agent: |
Mutt/1.1.4i |
On Sat, Feb 10, 2001 at 08:31:21PM -0500, Roland McGrath wrote:
> That looks correct to me, but you should do connect_queue as well.
Oh, right.
> You
> should be guaranteed that the queues are empty (length 0) by the time you
> get there (because anyone on the queue would hold a ref to the sock). But
> it wouldn't hurt to have an assert in connq_destroy.
Wouldn't it be more logical to have that assertion in sock_free?
> (cq->queue might
> still need to be freed, because the ways things are written it is the
> result of malloc(0) and it always might change whether that returns null or
> allocates a tiny amount, best not to presume malloc(0)==0.)
Yes.
Thanks,
Marcus
--
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann GNU http://www.gnu.org marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de