summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-05-21 17:27:25 -0700
committerJeremy Allison <jra@samba.org>2009-05-21 17:27:25 -0700
commitd4d06a4ef921e8fa543b86de002829ba0e7f77d3 (patch)
tree76726046afc6699e341394372949553c7df6a4b7 /source3
parenta91bcbccf8a2243dac57cacec6fdfc9907580f69 (diff)
downloadsamba-d4d06a4ef921e8fa543b86de002829ba0e7f77d3.tar.gz
samba-d4d06a4ef921e8fa543b86de002829ba0e7f77d3.tar.bz2
samba-d4d06a4ef921e8fa543b86de002829ba0e7f77d3.zip
Attempt to fix bug #6386 - Samba Panic triggered by Sophos Control Centre.
Don't indirect a potentially null pointer. Jeremy.
Diffstat (limited to 'source3')
-rw-r--r--source3/groupdb/mapping_ldb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/groupdb/mapping_ldb.c b/source3/groupdb/mapping_ldb.c
index 7ad0bbb703..b95ba0a9f9 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;
}