From 93ce0705c14f222bda3e6204f4b54ba1893f33e1 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 7 May 2008 14:28:23 +0200 Subject: [PATCH] Add an error return in find_forced_group() --- source/smbd/service.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/smbd/service.c b/source/smbd/service.c index 60d962f3fdf..30e48018e9a 100644 --- a/source/smbd/service.c +++ b/source/smbd/service.c @@ -557,6 +557,11 @@ static NTSTATUS find_forced_group(bool force_user, groupname = talloc_string_sub(talloc_tos(), groupname, "%S", lp_servicename(snum)); + if (groupname == NULL) { + DEBUG(1, ("talloc_string_sub failed\n")); + result = NT_STATUS_NO_MEMORY; + goto done; + } if (!lookup_name_smbconf(talloc_tos(), groupname, LOOKUP_NAME_ALL|LOOKUP_NAME_GROUP, -- 2.47.3