summaryrefslogtreecommitdiff
path: root/source/smbd/vfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/smbd/vfs.c')
-rw-r--r--source/smbd/vfs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/smbd/vfs.c b/source/smbd/vfs.c
index 0102739fe39..34671b8efc6 100644
--- a/source/smbd/vfs.c
+++ b/source/smbd/vfs.c
@@ -552,6 +552,9 @@ int vfs_allocate_file_space(files_struct *fsp, SMB_BIG_UINT len)
len -= st.st_size;
len /= 1024; /* Len is now number of 1k blocks needed. */
space_avail = SMB_VFS_DISK_FREE(conn,fsp->fsp_name,False,&bsize,&dfree,&dsize);
+ if (space_avail == (SMB_BIG_UINT)-1) {
+ return -1;
+ }
DEBUG(10,("vfs_allocate_file_space: file %s, grow. Current size %.0f, needed blocks = %.0f, space avail = %.0f\n",
fsp->fsp_name, (double)st.st_size, (double)len, (double)space_avail ));
@@ -940,7 +943,7 @@ BOOL reduce_name(connection_struct *conn, const pstring fname)
}
#endif
- DEBUG(3,("reduce_name: %s reduced to %s\n", fname, p));
+ DEBUG(3,("reduce_name: %s reduced to %s\n", fname, resolved_name));
if (free_resolved_name)
SAFE_FREE(resolved_name);
errno = saved_errno;