From: Hallvard Furuseth Date: Mon, 29 Sep 2003 14:06:48 +0000 (+0000) Subject: Plug memory leak in slap_get_csn(). X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~628 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=76dd417dc9ec1b38bb05b9c1df2fa4ba49bc0466;p=openldap Plug memory leak in slap_get_csn(). --- diff --git a/servers/slapd/ctxcsn.c b/servers/slapd/ctxcsn.c index 5f19d8f608..d4d44b9e39 100644 --- a/servers/slapd/ctxcsn.c +++ b/servers/slapd/ctxcsn.c @@ -179,13 +179,13 @@ slap_get_csn( { struct slap_csn_entry *pending; + if ( csn == NULL ) + return LDAP_OTHER; + if ( manage_ctxcsn ) { pending = (struct slap_csn_entry *) ch_calloc( 1, sizeof( struct slap_csn_entry )); } - if ( csn == NULL ) - return LDAP_OTHER; - csn->bv_len = lutil_csnstr( csnbuf, len, 0, 0 ); csn->bv_val = csnbuf;