This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: [Bug]mq_unlink does not correctly free the table entry
- To: I-Jui Sung <ijsung at csie dot nctu dot edu dot tw>
- Subject: Re: [ECOS] [Bug]mq_unlink does not correctly free the table entry
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Thu, 25 Oct 2001 00:41:11 +0100
- Cc: ecos-discuss at sources dot redhat dot com
- References: <000a01c15cce$5f5ddd90$0d8c718c@biou>
I-Jui Sung wrote:
>
> Hi eCos maintainers,
> In the compat/posix/current/src/mqueue.cxx, I found a bug that would
> cause message queue table entry leaking.
> The problem is the do_mq_unlink() function only free the tabent->mq but not
> set it to NULL, while the mq_open() will only see entries which have
> tabent->mq be NULL as empty slot. Thus a previously unlinked entry will
> never be used again.
> There's a quick fix: (also attached as mqueue.cxx.patch)
Thanks! I've applied this.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine