[SSSD] [PATCH] SYSDB: Check the return value

Jakub Hrozek jhrozek at redhat.com
Mon Aug 6 10:42:38 UTC 2012


A one-liner reported by Coverity
-------------- next part --------------
>From 1f9d22041099424dbeaa3800cc0f9a5c5798c4cf Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Sun, 5 Aug 2012 23:26:35 +0200
Subject: [PATCH] SYSDB: Check the return value

---
 src/db/sysdb_ops.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index e790ce2d3c7ec44ce526365d67e0fd73c69aa351..ed7b37e32acdb1d4032ec0815769902ebca3ec5b 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -983,6 +983,7 @@ int sysdb_add_user(struct sysdb_ctx *sysdb,
     if (ret) goto done;
 
     ret = sysdb_set_user_attr(sysdb, name, attrs, SYSDB_MOD_REP);
+    if (ret) goto done;
 
     /* remove all ghost users */
     filter = talloc_asprintf(tmp_ctx, "(|(%s=%s)", SYSDB_GHOST, name);
-- 
1.7.11.2



More information about the sssd-devel mailing list