From: Christian Ambach Date: Thu, 4 Feb 2016 20:38:20 +0000 (+0100) Subject: s3:utils/smbget add a error message on allocation error X-Git-Tag: tevent-0.9.27~69 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=64121471f98cfeaf48b701b3b85614a7436d3da9;p=thirdparty%2Fsamba.git s3:utils/smbget add a error message on allocation error Signed-off-by: Christian Ambach Reviewed-by: Volker Lendecke --- diff --git a/source3/utils/smbget.c b/source3/utils/smbget.c index 1dd8d775747..417ed844357 100644 --- a/source3/utils/smbget.c +++ b/source3/utils/smbget.c @@ -585,6 +585,8 @@ static bool smb_download_file(const char *base, const char *name, readbuf = (char *)SMB_MALLOC(opt.blocksize); if (!readbuf) { + fprintf(stderr, "Failed to allocate %zu bytes for read " + "buffer (%s)", opt.blocksize, strerror(errno)); if (localhandle != STDOUT_FILENO) { close(localhandle); }