fixed a vfs crash bug
authorAndrew Tridgell <tridge@samba.org>
Sat, 6 May 2000 15:00:49 +0000 (15:00 +0000)
committerAndrew Tridgell <tridge@samba.org>
Sat, 6 May 2000 15:00:49 +0000 (15:00 +0000)
source/smbd/conn.c

index 1dc4ac9e7d953af4c1da183ec0ab692c89aaba2c..f43a30d320a4d2892cdb2b38db6ce2b4718a50d5 100644 (file)
@@ -164,15 +164,13 @@ free a conn structure
 ****************************************************************************/
 void conn_free(connection_struct *conn)
 {
-       /* Close dlopen() handle */
-
-       if (conn->vfs_conn->dl_handle != NULL) {
-               dlclose(conn->vfs_conn->dl_handle);  /* should we check return val? */
-       }
-
        /* Free vfs_connection_struct */
            
        if (conn->vfs_conn != NULL) {
+               /* Close dlopen() handle */
+               if (conn->vfs_conn->dl_handle) {
+                       dlclose(conn->vfs_conn->dl_handle);
+               }
                if (conn->vfs_conn->groups != NULL) {
                        free(conn->vfs_conn->groups);
                }