summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-09-10 11:56:26 -0700
committerJeremy Allison <jra@samba.org>2010-09-10 11:56:26 -0700
commite8509589287ea04c6290dd127d3ef0c3e0b3f49d (patch)
tree473fdc4173437e0d14ac53ab2c5161e027a2abc6 /source3/utils
parent55598c4746f51f4a607c7b11e43ad56dcee22d87 (diff)
downloadsamba-e8509589287ea04c6290dd127d3ef0c3e0b3f49d.tar.gz
samba-e8509589287ea04c6290dd127d3ef0c3e0b3f49d.tar.bz2
samba-e8509589287ea04c6290dd127d3ef0c3e0b3f49d.zip
Check all SMB_MALLOC returns correctly. Found by Andreas Moroder <andreas.moroder@gmx.net>.
Jeremy
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) {