]> git.sur5r.net Git - openldap/commitdiff
Plug leak
authorHoward Chu <hyc@openldap.org>
Mon, 8 Oct 2007 13:28:25 +0000 (13:28 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 8 Oct 2007 13:28:25 +0000 (13:28 +0000)
servers/slapd/overlays/syncprov.c

index 1c27796c0e1a252bbe0293f8f4ee59690dafa258..95fa584ba429322e609afc3a56b2b840d8a7a0ac 100644 (file)
@@ -2208,6 +2208,8 @@ no_change:                nochange = 1;
                        if ( si->si_usehint && srs->sr_rhint == 0 ) {
                                if ( ctxcsn )
                                        ber_bvarray_free_x( ctxcsn, op->o_tmpmemctx );
+                               if ( sids )
+                                       op->o_tmpfree( sids, op->o_tmpmemctx );
                                send_ldap_error( op, rs, LDAP_SYNC_REFRESH_REQUIRED, "sync cookie is stale" );
                                return rs->sr_err;
                        }
@@ -2218,6 +2220,8 @@ no_change:                nochange = 1;
                                LDAP_SUCCESS ) {
                                if ( ctxcsn )
                                        ber_bvarray_free_x( ctxcsn, op->o_tmpmemctx );
+                               if ( sids )
+                                       op->o_tmpfree( sids, op->o_tmpmemctx );
                                send_ldap_result( op, rs );
                                return rs->sr_err;
                        }