diff options
Diffstat (limited to 'source3/passdb/lookup_sid.c')
-rw-r--r-- | source3/passdb/lookup_sid.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c index 9f66eb934e..4341bc02cc 100644 --- a/source3/passdb/lookup_sid.c +++ b/source3/passdb/lookup_sid.c @@ -548,10 +548,16 @@ static bool lookup_rids(TALLOC_CTX *mem_ctx, const DOM_SID *domain_sid, if (*domain_name == NULL) { *domain_name = talloc_strdup( mem_ctx, unix_users_domain_name()); + if (*domain_name == NULL) { + return false; + } } for (i=0; i<num_rids; i++) { (*names)[i] = talloc_strdup( (*names), uidtoname(rids[i])); + if ((*names)[i] == NULL) { + return false; + } (*types)[i] = SID_NAME_USER; } return true; @@ -561,10 +567,16 @@ static bool lookup_rids(TALLOC_CTX *mem_ctx, const DOM_SID *domain_sid, if (*domain_name == NULL) { *domain_name = talloc_strdup( mem_ctx, unix_groups_domain_name()); + if (*domain_name == NULL) { + return false; + } } for (i=0; i<num_rids; i++) { (*names)[i] = talloc_strdup( (*names), gidtoname(rids[i])); + if ((*names)[i] == NULL) { + return false; + } (*types)[i] = SID_NAME_DOM_GRP; } return true; |