summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-02-18 17:26:14 +0100
committerAlexander Bokovoy <ab@samba.org>2013-02-22 16:36:12 +0100
commita3ac48d07fa101743a023c31046495125498e5a1 (patch)
tree49278d68cdff812496f31f41a98533eb5d58e234 /source4/libcli
parent52530f5c61994766fd4c85017fcf5287b2d16837 (diff)
downloadsamba-a3ac48d07fa101743a023c31046495125498e5a1.tar.gz
samba-a3ac48d07fa101743a023c31046495125498e5a1.tar.bz2
samba-a3ac48d07fa101743a023c31046495125498e5a1.zip
s4-libcli: Add null check for ndr functions in rap.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/rap/rap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/libcli/rap/rap.c b/source4/libcli/rap/rap.c
index 1eee811f7f..9f41e17d27 100644
--- a/source4/libcli/rap/rap.c
+++ b/source4/libcli/rap/rap.c
@@ -39,9 +39,17 @@ struct rap_call *new_rap_cli_call(TALLOC_CTX *mem_ctx, uint16_t callno)
call->rcv_paramlen = 4;
call->ndr_push_param = ndr_push_init_ctx(call);
+ if (call->ndr_push_param == NULL) {
+ talloc_free(call);
+ return NULL;
+ }
call->ndr_push_param->flags = RAPNDR_FLAGS;
call->ndr_push_data = ndr_push_init_ctx(call);
+ if (call->ndr_push_data == NULL) {
+ talloc_free(call);
+ return NULL;
+ }
call->ndr_push_data->flags = RAPNDR_FLAGS;
call->pull_mem_ctx = mem_ctx;