From 76dd417dc9ec1b38bb05b9c1df2fa4ba49bc0466 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Mon, 29 Sep 2003 14:06:48 +0000 Subject: [PATCH] Plug memory leak in slap_get_csn(). --- servers/slapd/ctxcsn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.39.5