From 236321ce9c03da3ff0d345d89596205ed5be0e54 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 11 May 2003 08:42:58 +0000 Subject: [PATCH] Plug leak in hdb --- servers/slapd/back-bdb/id2entry.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/servers/slapd/back-bdb/id2entry.c b/servers/slapd/back-bdb/id2entry.c index b758769eb9..2660b697d2 100644 --- a/servers/slapd/back-bdb/id2entry.c +++ b/servers/slapd/back-bdb/id2entry.c @@ -169,17 +169,17 @@ int bdb_entry_return( e->e_name.bv_val = NULL; e->e_nname.bv_val = NULL; } + /* In tool mode the e_bv buffer is realloc'd, leave it alone */ + if( !(slapMode & SLAP_TOOL_MODE) ) { + free( e->e_bv.bv_val ); + } #else /* We had to construct the dn and ndn as well, in a single block */ if( e->e_name.bv_val ) { free( e->e_name.bv_val ); } + free( e->e_bv.bv_val ); #endif - /* In tool mode the e_bv buffer is realloc'd, leave it alone */ - if( !(slapMode & SLAP_TOOL_MODE) ) { - free( e->e_bv.bv_val ); - } - free( e ); return 0; -- 2.39.5