summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbget.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/utils/smbget.c b/source3/utils/smbget.c
index 02ce46ee97..f09c2f6530 100644
--- a/source3/utils/smbget.c
+++ b/source3/utils/smbget.c
@@ -442,6 +442,9 @@ static int smb_download_file(const char *base, const char *name, int recursive,
}
readbuf = (char *)SMB_MALLOC(blocksize);
+ if (!readbuf) {
+ return 1;
+ }
/* Now, download all bytes from offset_download to the end */
for(curpos = offset_download; curpos < remotestat.st_size; curpos+=blocksize) {