]> git.sur5r.net Git - openldap/commitdiff
fix invalid read
authorPierangelo Masarati <ando@openldap.org>
Mon, 7 Nov 2005 01:07:59 +0000 (01:07 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 7 Nov 2005 01:07:59 +0000 (01:07 +0000)
servers/slapd/back-sql/sql-wrap.c

index aaa0a1ac640b2feef89f8442f2e4b9f72454b89b..e942a17d65769776d08203caf11e7c4727a742fd 100644 (file)
@@ -257,9 +257,10 @@ static void
 backsql_close_db_conn( void *v_conn )
 {
        backsql_db_conn *conn =         (backsql_db_conn *)v_conn;
+       unsigned long   cid = conn->ldap_cid;
 
        Debug( LDAP_DEBUG_TRACE, "==>backsql_close_db_conn(%lu)\n",
-               conn->ldap_cid, 0, 0 );
+               cid, 0, 0 );
 
        /*
         * Default transact is SQL_ROLLBACK; commit is required only
@@ -274,7 +275,7 @@ backsql_close_db_conn( void *v_conn )
        ch_free( conn );
 
        Debug( LDAP_DEBUG_TRACE, "<==backsql_close_db_conn(%lu)\n",
-               conn->ldap_cid, 0, 0 );
+               cid, 0, 0 );
 }
 
 int