summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-12-16 11:18:04 +0100
committerStefan Metzmacher <metze@samba.org>2011-12-16 11:31:48 +0100
commit17781b1c863332b9a808b8052119b70b122ff9f3 (patch)
tree91b1ceb675820363c404f8990f1d4fc090af12d2 /source4
parent850b374deda678924235af3878239877298874cd (diff)
downloadsamba-17781b1c863332b9a808b8052119b70b122ff9f3.tar.gz
samba-17781b1c863332b9a808b8052119b70b122ff9f3.tar.bz2
samba-17781b1c863332b9a808b8052119b70b122ff9f3.zip
s4:libcli/rap: use talloc_zero() and initialize everything
metze
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/rap/rap.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source4/libcli/rap/rap.c b/source4/libcli/rap/rap.c
index 007c52037f..bebe9fb1dd 100644
--- a/source4/libcli/rap/rap.c
+++ b/source4/libcli/rap/rap.c
@@ -30,18 +30,13 @@ struct rap_call *new_rap_cli_call(TALLOC_CTX *mem_ctx, uint16_t callno)
{
struct rap_call *call;
- call = talloc(mem_ctx, struct rap_call);
-
- if (call == NULL)
+ call = talloc_zero(mem_ctx, struct rap_call);
+ if (call == NULL) {
return NULL;
+ }
call->callno = callno;
call->rcv_paramlen = 4;
- call->rcv_datalen = 0;
-
- call->paramdesc = NULL;
- call->datadesc = NULL;
- call->auxdatadesc = NULL;
call->ndr_push_param = ndr_push_init_ctx(mem_ctx);
call->ndr_push_param->flags = RAPNDR_FLAGS;