summaryrefslogtreecommitdiff
path: root/source3/smbd/conn.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2003-04-16 14:45:11 +0000
committerJelmer Vernooij <jelmer@samba.org>2003-04-16 14:45:11 +0000
commitddf662d11886189151dca188a2eb4f6bd602caa0 (patch)
tree65a391fd3f9281f65fc1c8098ef1bcab15a5c0ba /source3/smbd/conn.c
parent0abad3ad5cf467649ebc05a190cc34a7616fa271 (diff)
downloadsamba-ddf662d11886189151dca188a2eb4f6bd602caa0.tar.gz
samba-ddf662d11886189151dca188a2eb4f6bd602caa0.tar.bz2
samba-ddf662d11886189151dca188a2eb4f6bd602caa0.zip
More merges from HEAD:
- Stephan Kulow's changes (fixing warnings in libsmbclient) - VFS modules - Seperating libs (This used to be commit 6e9b7802335428c88ecf4e44a0e2395ac58e96b5)
Diffstat (limited to 'source3/smbd/conn.c')
-rw-r--r--source3/smbd/conn.c21
1 files changed, 12 insertions, 9 deletions
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);