s3:winbindd fix use of uninitialized variables
authorChristian Ambach <ambi@samba.org>
Mon, 16 Sep 2013 11:18:17 +0000 (13:18 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 7 Jan 2014 11:25:50 +0000 (12:25 +0100)
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-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Tue Jan  7 12:25:51 CET 2014 on sn-devel-104

source3/winbindd/winbindd_cache.c

index c4637800539385ae9cc949d18fe3c4b8d13bd5d4..34319dfab27422f0d3c70cb9fff38cead9a6cd20 100644 (file)
@@ -2120,6 +2120,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;