PERFORCE change 141676 for review
Vincenzo Iozzo
snagg at FreeBSD.org
Fri May 16 16:46:21 UTC 2008
You're right Christian, thanks for the review
Il giorno 16/mag/08, alle ore 16:18, Christian S.J. Peron ha scritto:
> 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.
More information about the p4-projects
mailing list