Date: Fri, 16 May 2008 09:18:29 -0500 From: "Christian S.J. Peron" <csjp@FreeBSD.org> To: Vincenzo Iozzo <snagg@FreeBSD.org> Cc: Perforce Change Reviews <perforce@FreeBSD.org> Subject: Re: PERFORCE change 141676 for review Message-ID: <20080516141829.GA30393@sub.vaned.net> In-Reply-To: <200805152145.m4FLjW3L015582@repoman.freebsd.org>
index | next in thread | previous in thread | raw e-mail
On Thu, May 15, 2008 at 09:45:32PM +0000, Vincenzo Iozzo wrote:
[..]
> ==== //depot/projects/soc2008/snagg-audit/sys/security/audit/audit_pipe.c#9 (text) ====
>
> @@ -435,10 +435,6 @@
> if (app != NULL) {
> TAILQ_REMOVE(&ap->ap_preselect_list, app, app_list);
> mtx_unlock(&audit_pipe_mtx);
> - }
> -
> - mtx_unlock(&audit_pipe_mtx);
> - if (app != NULL) {
> for(i = 0; i < app->app_event_len; i++)
Now we have eliminated the unlock which means we are leaking a mutex. Why not
try something like:
[..]
if (app != NULL)
TAILQ_REMOVE(&ap->ap_preselect_list, app, app_list);
mtx_unlock(&audit_pipe_mtx);
This way we dont need to worry about conditionally dropping the mutex.
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080516141829.GA30393>
