summaryrefslogtreecommitdiff
path: root/source4/libcli/raw
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-02-19 09:00:51 +0100
committerAlexander Bokovoy <ab@samba.org>2013-02-22 16:36:13 +0100
commit5207d456f1132041a07c9b3c48bfa7a9112a698f (patch)
tree551d5a577e715f216f30fd62b881de40eb50ca45 /source4/libcli/raw
parent9e6e9c7707506709de2b0e765647783f471b412a (diff)
downloadsamba-5207d456f1132041a07c9b3c48bfa7a9112a698f.tar.gz
samba-5207d456f1132041a07c9b3c48bfa7a9112a698f.tar.bz2
samba-5207d456f1132041a07c9b3c48bfa7a9112a698f.zip
s4-libcli: Check return value of smbcli_request_setup().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r--source4/libcli/raw/clioplock.c3
-rw-r--r--source4/libcli/raw/clitree.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/source4/libcli/raw/clioplock.c b/source4/libcli/raw/clioplock.c
index 396ab96445..6c04843f3f 100644
--- a/source4/libcli/raw/clioplock.c
+++ b/source4/libcli/raw/clioplock.c
@@ -30,6 +30,9 @@ _PUBLIC_ bool smbcli_oplock_ack(struct smbcli_tree *tree, uint16_t fnum, uint16_
struct smbcli_request *req;
req = smbcli_request_setup(tree, SMBlockingX, 8, 0);
+ if (req == NULL) {
+ return false;
+ }
SSVAL(req->out.vwv,VWV(0),0xFF);
SSVAL(req->out.vwv,VWV(1),0);
diff --git a/source4/libcli/raw/clitree.c b/source4/libcli/raw/clitree.c
index 1c3321e6b8..11be5485f2 100644
--- a/source4/libcli/raw/clitree.c
+++ b/source4/libcli/raw/clitree.c
@@ -168,6 +168,9 @@ _PUBLIC_ NTSTATUS smb_tree_disconnect(struct smbcli_tree *tree)
if (!tree) return NT_STATUS_OK;
req = smbcli_request_setup(tree, SMBtdis, 0, 0);
+ if (req == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
if (smbcli_request_send(req)) {
(void) smbcli_request_receive(req);