diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/smbd/service.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/smbd/service.c b/source/smbd/service.c index e4c3890f864..e5655bd9f4c 100644 --- a/source/smbd/service.c +++ b/source/smbd/service.c @@ -894,6 +894,9 @@ void close_cnum(connection_struct *conn, uint16 vuid) file_close_conn(conn); dptr_closecnum(conn); + /* make sure we leave the directory available for unmount */ + vfs_ChDir(conn, "/"); + /* execute any "postexec = " line */ if (*lp_postexec(SNUM(conn)) && change_to_user(conn, vuid)) { @@ -913,8 +916,5 @@ void close_cnum(connection_struct *conn, uint16 vuid) smbrun(cmd,NULL); } - /* make sure we leave the directory available for unmount */ - vfs_ChDir(conn, "/"); - conn_free(conn); } |