From: Howard Chu Date: Mon, 28 Apr 2008 12:53:04 +0000 (+0000) Subject: ITS#5451 glue deadlock fix X-Git-Tag: LOCKER_IDS~197 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=64315e30877e9b0bec99f4fd0863bc392610a947;p=openldap ITS#5451 glue deadlock fix --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index dade31d5aa..9ca4153f7c 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -2396,7 +2396,14 @@ syncprov_operational( if ( !ap ) { if ( !(rs->sr_flags & REP_ENTRY_MODIFIABLE) ) { - rs->sr_entry = entry_dup( rs->sr_entry ); + Entry *e = entry_dup( rs->sr_entry ); + if ( rs->sr_flags & REP_ENTRY_MUSTRELEASE ) { + overlay_entry_release_ov( op, rs->sr_entry, 0, on ); + rs->sr_flags ^= REP_ENTRY_MUSTRELEASE; + } else if ( rs->sr_flags & REP_ENTRY_MUSTBEFREED ) { + entry_free( rs->sr_entry ); + } + rs->sr_entry = e; rs->sr_flags |= REP_ENTRY_MODIFIABLE|REP_ENTRY_MUSTBEFREED; a = attr_find( rs->sr_entry->e_attrs,