URL: https://github.com/SSSD/sssd/pull/5807
Author: justin-stephenson
 Title: #5807: KCM: Remove unneeded allocation
Action: opened

PR body:
"""
Memory is allocated later for the individual ccache when retrieved with 
secdb_get_cc()
"""

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5807/head:pr5807
git checkout pr5807
From 8f01447d5b1fa1b2dfa6935d28d73752f67f4528 Mon Sep 17 00:00:00 2001
From: Justin Stephenson <jstep...@redhat.com>
Date: Mon, 4 Oct 2021 16:15:05 -0400
Subject: [PATCH] KCM: Remove unneeded allocation

Memory is allocated later for the individual ccache when retrieved
with secdb_get_cc()
---
 src/responder/kcm/kcmsrv_ccache_secdb.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/responder/kcm/kcmsrv_ccache_secdb.c b/src/responder/kcm/kcmsrv_ccache_secdb.c
index 4631bfea09..b10e5c33c9 100644
--- a/src/responder/kcm/kcmsrv_ccache_secdb.c
+++ b/src/responder/kcm/kcmsrv_ccache_secdb.c
@@ -855,12 +855,6 @@ static errno_t ccdb_secdb_get_cc_for_uuid(TALLOC_CTX *mem_ctx,
     for (size_t i = 0; i < uuid_list_count; i++) {
         struct passwd *pwd;
 
-        cc_list[i] = talloc_zero(cc_list, struct kcm_ccache);
-        if (cc_list[i] == NULL) {
-            ret = ENOMEM;
-            goto done;
-        }
-
         ret = split_on_separator(tmp_ctx, uuid_list[i], ':', true, true,
                                  &list, NULL);
         if (ret != EOK) {
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to