From ee4ee4c5414fdf0e8c27249016f033b87ec65ca4 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 17 Jun 2006 07:43:56 +0000 Subject: r16335: Fix Klocwork IDs 107 108 109 111 112 113 114 116 117 118 121 (This used to be commit 555984ea772730a5752905f1130e0bf6ec48207f) --- source3/rpc_client/cli_lsarpc.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/rpc_client/cli_lsarpc.c') diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c index ac797243ed..deb97724a0 100644 --- a/source3/rpc_client/cli_lsarpc.c +++ b/source3/rpc_client/cli_lsarpc.c @@ -1177,6 +1177,12 @@ NTSTATUS rpccli_lsa_enum_account_rights(struct rpc_pipe_client *cli, TALLOC_CTX privileges = TALLOC_ARRAY( mem_ctx, fstring, *count ); names = TALLOC_ARRAY( mem_ctx, char *, *count ); + if ((privileges == NULL) || (names == NULL)) { + TALLOC_FREE(privileges); + TALLOC_FREE(names); + return NT_STATUS_NO_MEMORY; + } + for ( i=0; i<*count; i++ ) { UNISTR4 *uni_string = &r.rights->strings[i]; -- cgit