Skip to content
Snippets Groups Projects
Commit 339c2354 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Plug a leak reported by Jorg Pietschmann <pietsch@swissline.ch>

Still leaks ber_scanf results here and there...
parent bfd6702f
No related branches found
No related tags found
No related merge requests found
......@@ -45,10 +45,6 @@ do_add( Connection *conn, Operation *op )
* }
*/
e = (Entry *) ch_calloc( 1, sizeof(Entry) );
/* initialize reader/writer lock */
entry_rdwr_init(e);
/* get the name */
if ( ber_scanf( ber, "{a", &dn ) == LBER_ERROR ) {
Debug( LDAP_DEBUG_ANY, "ber_scanf failed\n", 0, 0, 0 );
......@@ -56,6 +52,11 @@ do_add( Connection *conn, Operation *op )
"decoding error" );
return;
}
e = (Entry *) ch_calloc( 1, sizeof(Entry) );
/* initialize reader/writer lock */
entry_rdwr_init(e);
e->e_dn = dn;
dn = dn_normalize( ch_strdup( dn ) );
Debug( LDAP_DEBUG_ARGS, " do_add: dn (%s)\n", dn, 0, 0 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment