Skip to content

Commit

Permalink
SYSDB: update in sysdb_add_group_member_overrides()
Browse files Browse the repository at this point in the history
No need to make a copy of override name.
  • Loading branch information
alexey-tikhonov committed Feb 18, 2025
1 parent 65056c6 commit 9109bbb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/db/sysdb_views.c
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,7 @@ errno_t sysdb_add_group_member_overrides(struct sss_domain_info *domain,
static const char *member_attrs[] = SYSDB_PW_ATTRS;
struct ldb_dn *override_dn = NULL;
const char *memberuid;
char *val;
const char *val;

if (domain->ignore_group_members) {
return EOK;
Expand All @@ -1592,8 +1592,7 @@ errno_t sysdb_add_group_member_overrides(struct sss_domain_info *domain,
tmp_ctx = talloc_new(NULL);
if (tmp_ctx == NULL) {
DEBUG(SSSDBG_OP_FAILURE, "talloc_new failed.\n");
ret = ENOMEM;
goto done;
return ENOMEM;
}

ret = sysdb_get_user_members_recursively(tmp_ctx, domain, obj->dn,
Expand Down Expand Up @@ -1688,7 +1687,7 @@ errno_t sysdb_add_group_member_overrides(struct sss_domain_info *domain,
}
}

val = talloc_strdup(obj, memberuid);
val = talloc_steal(obj, memberuid);
if (val == NULL) {
DEBUG(SSSDBG_OP_FAILURE, "talloc_strdup failed.\n");
ret = ENOMEM;
Expand Down

0 comments on commit 9109bbb

Please sign in to comment.