From: Volker Lendecke Date: Wed, 7 May 2008 12:28:23 +0000 (+0200) Subject: Add an error return in find_forced_group() X-Git-Tag: samba-3.3.0pre1~1273 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=93ce0705c14f222bda3e6204f4b54ba1893f33e1;p=thirdparty%2Fsamba.git Add an error return in find_forced_group() --- 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,