[SCM] Samba Shared Repository - branch master updated -
release-4-0-0alpha7-1207-g14bbed1
Stefan Metzmacher
metze at samba.org
Tue Apr 21 15:46:03 GMT 2009
The branch, master has been updated
via 14bbed1d6703764e6a58f335f142490895e5c768 (commit)
from 7a0a134e0cc0720402b2e07ee8bc9887ce8e8c5d (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 14bbed1d6703764e6a58f335f142490895e5c768
Author: Stefan Metzmacher <metze at samba.org>
Date: Tue Apr 21 17:42:39 2009 +0200
s3:libsmb: always use the tevent_req_nomem() for checking allocation failures
This will also make sure we cleanup 'req' in case of an error.
metze
-----------------------------------------------------------------------
Summary of changes:
source3/libsmb/clifile.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index f5d5ad0..1a1153d 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -622,8 +622,8 @@ struct tevent_req *cli_mkdir_send(TALLOC_CTX *mem_ctx,
}
bytes = talloc_array(state, uint8_t, 1);
- if (!bytes) {
- return NULL;
+ if (tevent_req_nomem(bytes, req)) {
+ return tevent_req_post(req, ev);
}
bytes[0] = 4;
bytes = smb_bytes_push_str(bytes, cli_ucs2(cli), dname,
@@ -634,7 +634,7 @@ struct tevent_req *cli_mkdir_send(TALLOC_CTX *mem_ctx,
}
subreq = cli_smb_send(state, ev, cli, SMBmkdir, additional_flags,
- 0, NULL, talloc_get_size(bytes), bytes);
+ 0, NULL, talloc_get_size(bytes), bytes);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
@@ -730,8 +730,8 @@ struct tevent_req *cli_rmdir_send(TALLOC_CTX *mem_ctx,
}
bytes = talloc_array(state, uint8_t, 1);
- if (!bytes) {
- return NULL;
+ if (tevent_req_nomem(bytes, req)) {
+ return tevent_req_post(req, ev);
}
bytes[0] = 4;
bytes = smb_bytes_push_str(bytes, cli_ucs2(cli), dname,
@@ -742,7 +742,7 @@ struct tevent_req *cli_rmdir_send(TALLOC_CTX *mem_ctx,
}
subreq = cli_smb_send(state, ev, cli, SMBrmdir, additional_flags,
- 0, NULL, talloc_get_size(bytes), bytes);
+ 0, NULL, talloc_get_size(bytes), bytes);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list