summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2013-09-16 13:18:17 +0200
committerKarolin Seeger <kseeger@samba.org>2014-01-02 21:49:28 +0100
commitc765c2ac7687be26eae7376861ee9da500744942 (patch)
tree2753f43cf1cd54bde0d1637b6f195cff88eeaba8
parent9c78cc37444ad4dda5c34c44861006a451e32e19 (diff)
downloadsamba-c765c2ac7687be26eae7376861ee9da500744942.tar.gz
s3:winbindd fix use of uninitialized variables
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10280 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 7393781a57891687b464762b0954e6c936f750bb) Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-1-test): Thu Jan 2 21:49:28 CET 2014 on sn-devel-104
-rw-r--r--source3/winbindd/winbindd_cache.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
index fe05759131a..ec7ddb7ed88 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -2124,6 +2124,19 @@ static NTSTATUS rids_to_names(struct winbindd_domain *domain,
old_status) {
have_mapped = have_unmapped = false;
+ *names = talloc_array(mem_ctx, char *, num_rids);
+ if (*names != NULL) {
+ result = NT_STATUS_NO_MEMORY;
+ goto error;
+ }
+
+ *types = talloc_array(mem_ctx, enum lsa_SidType,
+ num_rids);
+ if (*types != NULL) {
+ result = NT_STATUS_NO_MEMORY;
+ goto error;
+ }
+
for (i=0; i<num_rids; i++) {
struct dom_sid sid;
struct cache_entry *centry;