Blob Blame History Raw
From 80bfea505c45824f129290309c86e0df941914b7 Mon Sep 17 00:00:00 2001
From: Alexey Tikhonov <atikhono@redhat.com>
Date: Mon, 28 Jan 2019 18:30:21 +0100
Subject: [PATCH 2/9] providers/proxy: fixed wrong check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixed evident "copy-paste" bug with wrong var being checked for NULL
in proxy_id.c:remove_duplicate_group_members()

Reviewed-by: Pavel Březina <pbrezina@redhat.com>
(cherry picked from commit 0f62cc9fbe27887462f322540abde3b8279c6b2f)

Reviewed-by: Pavel Březina <pbrezina@redhat.com>
---
 src/providers/proxy/proxy_id.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/providers/proxy/proxy_id.c b/src/providers/proxy/proxy_id.c
index 478709f69..db65a984c 100644
--- a/src/providers/proxy/proxy_id.c
+++ b/src/providers/proxy/proxy_id.c
@@ -629,7 +629,7 @@ static errno_t remove_duplicate_group_members(TALLOC_CTX *mem_ctx,
 
         value.type = HASH_VALUE_PTR;
         value.ptr = talloc_strdup(member_tbl, orig_grp->gr_mem[i]);
-        if (key.str == NULL) {
+        if (value.ptr == NULL) {
             DEBUG(SSSDBG_OP_FAILURE, "talloc_strdup failed.\n");
             ret = ENOMEM;
             goto done;
-- 
2.21.1