From ddf662d11886189151dca188a2eb4f6bd602caa0 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 16 Apr 2003 14:45:11 +0000 Subject: More merges from HEAD: - Stephan Kulow's changes (fixing warnings in libsmbclient) - VFS modules - Seperating libs (This used to be commit 6e9b7802335428c88ecf4e44a0e2395ac58e96b5) --- source3/smbd/conn.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'source3/smbd/conn.c') diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c index 38fa2e0237..b6c7aa1076 100644 --- a/source3/smbd/conn.c +++ b/source3/smbd/conn.c @@ -201,15 +201,18 @@ void conn_free(connection_struct *conn) /* Free vfs_connection_struct */ handle = conn->vfs_private; while(handle) { - /* Close dlopen() handle */ - done_fptr = (void (*)(connection_struct *))sys_dlsym(handle->handle, "vfs_done"); - - if (done_fptr == NULL) { - DEBUG(3, ("No vfs_done() symbol found in module with handle %p, ignoring\n", handle->handle)); - } else { - done_fptr(conn); - } - sys_dlclose(handle->handle); + /* Only call dlclose for the old modules */ + if (handle->handle) { + /* Close dlopen() handle */ + done_fptr = (void (*)(connection_struct *))sys_dlsym(handle->handle, "vfs_done"); + + if (done_fptr == NULL) { + DEBUG(3, ("No vfs_done() symbol found in module with handle %p, ignoring\n", handle->handle)); + } else { + done_fptr(conn); + } + sys_dlclose(handle->handle); + } DLIST_REMOVE(conn->vfs_private, handle); thandle = handle->next; SAFE_FREE(handle); -- cgit