/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2000-2005 The OpenLDAP Foundation.
+ * Copyright 2000-2006 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
static void
rewrite_session_free( void *v_session )
{
+ struct rewrite_session *session = (struct rewrite_session *)v_session;
+
+ ldap_pvt_thread_mutex_lock( &session->ls_mutex );
rewrite_session_clean( v_session );
free( v_session );
}