From: Jeremy Allison Date: Fri, 22 May 2009 00:27:25 +0000 (-0700) Subject: Attempt to fix bug #6386 - Samba Panic triggered by Sophos Control Centre. X-Git-Tag: tdb-1.1.5~430 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4d06a4ef921e8fa543b86de002829ba0e7f77d3;p=thirdparty%2Fsamba.git Attempt to fix bug #6386 - Samba Panic triggered by Sophos Control Centre. Don't indirect a potentially null pointer. Jeremy. --- diff --git a/source3/groupdb/mapping_ldb.c b/source3/groupdb/mapping_ldb.c index 7ad0bbb703e..b95ba0a9f95 100644 --- a/source3/groupdb/mapping_ldb.c +++ b/source3/groupdb/mapping_ldb.c @@ -276,7 +276,7 @@ static bool get_group_map_from_ntname(const char *name, GROUP_MAP *map) ret = ldb_search(ldb, talloc_tos(), &res, NULL, LDB_SCOPE_SUBTREE, NULL, "(&(ntName=%s)(objectClass=groupMap))", name); - if (ret != LDB_SUCCESS || res->count != 1) { + if (ret != LDB_SUCCESS || (res && res->count != 1)) { goto failed; }