[SSSD] [PATCH] LDAP: Always fail if a map can't be found

Jakub Hrozek jhrozek at redhat.com
Fri Apr 5 15:39:34 UTC 2013


Hopefully this is the last real issue that Coverity discovered.
-------------- next part --------------
>From 4ec51e8f8ccfee414a8ce01a093ca929c0835ea2 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Fri, 5 Apr 2013 15:14:34 +0200
Subject: [PATCH] LDAP: Always fail if a map can't be found

---
 src/providers/ldap/sdap.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c
index dba4e41db0039632939f275f9295321afe7a31ae..5cdbffd92d5b5eb9fa3212b324ad91a2da6c2120 100644
--- a/src/providers/ldap/sdap.c
+++ b/src/providers/ldap/sdap.c
@@ -77,10 +77,7 @@ int sdap_get_map(TALLOC_CTX *memctx,
         if (map[i].def_name && !map[i].name) {
             DEBUG(SSSDBG_CRIT_FAILURE,
                   ("Failed to retrieve value for %s\n", map[i].opt_name));
-            if (ret != EOK) {
-                talloc_zfree(map);
-                return EINVAL;
-            }
+            return EINVAL;
         }
 
         DEBUG(SSSDBG_TRACE_FUNC, ("Option %s has%s value %s\n",
-- 
1.8.1.4



More information about the sssd-devel mailing list