From: Howard Chu Date: Tue, 5 Jan 2010 03:50:10 +0000 (+0000) Subject: ITS#6438 check for redundant syncops_free() ? X-Git-Tag: MIGRATION_CVS2GIT~722 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0c195fc013a023bc044b992e0586acf6bcb893bb;p=openldap ITS#6438 check for redundant syncops_free() ? --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 8fb306241b..2cbc9722cc 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -783,7 +783,8 @@ syncprov_free_syncop( syncops *so ) GroupAssertion *ga, *gnext; ldap_pvt_thread_mutex_lock( &so->s_mutex ); - if ( --so->s_inuse > 0 ) { + /* already being freed, or still in use */ + if ( !so->s_inuse || --so->s_inuse > 0 ) { ldap_pvt_thread_mutex_unlock( &so->s_mutex ); return; }