Blame SOURCES/0002-sssctl-Fix-error-handling-after-memory-allocation-fa.patch

b2d430
From 36adb8fdc1e0ec14d394a2c51be16c90f4fa1acd Mon Sep 17 00:00:00 2001
b2d430
From: Lukas Slebodnik <lslebodn@redhat.com>
b2d430
Date: Fri, 8 Jul 2016 12:16:47 +0200
b2d430
Subject: [PATCH 02/18] sssctl: Fix error handling after memory allocation
b2d430
 failure
b2d430
MIME-Version: 1.0
b2d430
Content-Type: text/plain; charset=UTF-8
b2d430
Content-Transfer-Encoding: 8bit
b2d430
b2d430
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
b2d430
(cherry picked from commit 4b18d0c25471150940c1a552bc2504ff9debb703)
b2d430
---
b2d430
 src/tools/sssctl/sssctl_cache.c | 3 ++-
b2d430
 1 file changed, 2 insertions(+), 1 deletion(-)
b2d430
b2d430
diff --git a/src/tools/sssctl/sssctl_cache.c b/src/tools/sssctl/sssctl_cache.c
b2d430
index 9f626d983a4672cf00fba6b3171b822e8f6e02bd..28de6c139d844f98f9b06844492c935696e19643 100644
b2d430
--- a/src/tools/sssctl/sssctl_cache.c
b2d430
+++ b/src/tools/sssctl/sssctl_cache.c
b2d430
@@ -364,8 +364,9 @@ static errno_t sssctl_find_object(TALLOC_CTX *mem_ctx,
b2d430
         filter = talloc_asprintf(tmp_ctx, "(&(objectClass=%s)(%s=%s))",
b2d430
                                  class, attr_name, filter_value);
b2d430
         talloc_free(filter_value);
b2d430
-        if (filter_value == NULL) {
b2d430
+        if (filter == NULL) {
b2d430
             DEBUG(SSSDBG_CRIT_FAILURE, "talloc_asprintf() failed\n");
b2d430
+            ret = ENOMEM;
b2d430
             goto done;
b2d430
         }
b2d430
 
b2d430
-- 
b2d430
2.4.11
b2d430