mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
r3871: Fix memleak
(This used to be commit dbfdde5f63f34fbe4ba1d794fcfc120178ff039a)
This commit is contained in:
parent
aa077290fc
commit
b917dd4bfa
@ -2210,7 +2210,7 @@ static NTSTATUS ldapsam_enum_group_memberships(struct pdb_methods *methods,
|
||||
struct smbldap_state *conn = ldap_state->smbldap_state;
|
||||
pstring filter;
|
||||
char *attrs[] = { "gidNumber", "sambaSID", NULL };
|
||||
char *escape_name = escape_ldap_string_alloc(username);
|
||||
char *escape_name;
|
||||
int rc;
|
||||
LDAPMessage *msg = NULL;
|
||||
LDAPMessage *entry;
|
||||
@ -2226,6 +2226,8 @@ static NTSTATUS ldapsam_enum_group_memberships(struct pdb_methods *methods,
|
||||
*sids = NULL;
|
||||
num_sids = 0;
|
||||
|
||||
escape_name = escape_ldap_string_alloc(username);
|
||||
|
||||
if (escape_name == NULL)
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user