From 314e8fcf9334c94f8a54cc04437be0a4fb1bfb4f Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Mon, 16 Sep 2013 13:18:17 +0200 Subject: [PATCH] s3:winbindd fix use of uninitialized variables Bug: https://bugzilla.samba.org/show_bug.cgi?id=10280 Signed-off-by: Christian Ambach Reviewed-by: Stefan Metzmacher (cherry picked from commit 7393781a57891687b464762b0954e6c936f750bb) --- source3/winbindd/winbindd_cache.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c index fe05759..ec7ddb7 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