diff options
author | Jeremy Allison <jra@samba.org> | 2010-09-09 15:29:03 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-09-09 15:29:03 -0700 |
commit | 718fd39f10310d10ebc2276021d97d48f1163a88 (patch) | |
tree | c3131e859fbf5186596e7f04284095dcde6215c9 /source3/libsmb | |
parent | e6b85c2a7b3cfa0dd3c9859c88e5462c616d5a2a (diff) | |
download | samba-718fd39f10310d10ebc2276021d97d48f1163a88.tar.gz samba-718fd39f10310d10ebc2276021d97d48f1163a88.tar.bz2 samba-718fd39f10310d10ebc2276021d97d48f1163a88.zip |
Fox missing SMB_MALLOC return checks noticed by "Andreas Moroder <andreas.moroder@gmx.net>".
Jeremy.
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/cliconnect.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 49da8edb7c..169bf4f037 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -2135,6 +2135,11 @@ static void cli_negprot_done(struct tevent_req *subreq) SAFE_FREE(cli->inbuf); cli->outbuf = (char *)SMB_MALLOC(CLI_SAMBA_MAX_LARGE_READX_SIZE+LARGE_WRITEX_HDR_SIZE+SAFETY_MARGIN); cli->inbuf = (char *)SMB_MALLOC(CLI_SAMBA_MAX_LARGE_READX_SIZE+LARGE_WRITEX_HDR_SIZE+SAFETY_MARGIN); + if (!cli->outbuf || !cli->inbuf) { + tevent_req_nterror(req, + NT_STATUS_NO_MEMORY); + return; + } cli->bufsize = CLI_SAMBA_MAX_LARGE_READX_SIZE + LARGE_WRITEX_HDR_SIZE; } |