]> git.sur5r.net Git - openldap/commitdiff
Plug SLAPI leak
authorHoward Chu <hyc@openldap.org>
Thu, 25 Sep 2003 11:28:31 +0000 (11:28 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 25 Sep 2003 11:28:31 +0000 (11:28 +0000)
servers/slapd/result.c

index c4311df7363513904964028e15ba06d5444a5a44..c5a6e777712db95896d4485fefafe1b7c1462879 100644 (file)
@@ -373,7 +373,8 @@ send_ldap_response(
 #ifdef LDAP_SLAPI
        slapi_pblock_set( op->o_pb, SLAPI_RESULT_CODE, (void *)rs->sr_err );
        slapi_pblock_set( op->o_pb, SLAPI_RESULT_MATCHED, ( rs->sr_matched != NULL ) ? (void *)ch_strdup( rs->sr_matched ) : NULL );
-       slapi_pblock_set( op->o_pb, SLAPI_RESULT_TEXT, ( rs->sr_text != NULL ) ? (void *)ch_strdup( rs->sr_text ) : NULL );
+       /* RESULT_TEXT is dup'd by pblock_set */
+       slapi_pblock_set( op->o_pb, SLAPI_RESULT_TEXT, rs->sr_text );
 #endif /* LDAP_SLAPI */
 
        ldap_pvt_thread_mutex_lock( &num_sent_mutex );