[PATCH] winbind: Fix CID 1357100 Unchecked return value

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Mar 22 10:27:10 UTC 2016


Hi!

Review appreciated!

Thanks, Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 0b723951dc844ac81feadb0d507e7b59ce0602a2 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Tue, 22 Mar 2016 11:24:23 +0100
Subject: [PATCH] winbind: Fix CID 1357100 Unchecked return value

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source3/winbindd/idmap.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/source3/winbindd/idmap.c b/source3/winbindd/idmap.c
index faf0df2..7eb7e58 100644
--- a/source3/winbindd/idmap.c
+++ b/source3/winbindd/idmap.c
@@ -126,8 +126,12 @@ bool domain_has_idmap_config(const char *domname)
 	char *config_option;
 	const char *range = NULL;
 	const char *backend = NULL;
+	bool ok;
 
-	idmap_init();
+	ok = idmap_init();
+	if (!ok) {
+		return false;
+	}
 
 	for (i=0; i<num_domains; i++) {
 		if (strequal(idmap_domains[i]->name, domname)) {
-- 
2.1.4



More information about the samba-technical mailing list