summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_ads.c5
-rw-r--r--source3/winbindd/winbindd_cache.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c
index 5c7d4918497..a508682e5eb 100644
--- a/source3/winbindd/winbindd_ads.c
+++ b/source3/winbindd/winbindd_ads.c
@@ -525,7 +525,10 @@ static NTSTATUS query_user(struct winbindd_domain *domain,
}
sidstr = sid_binstring(sid);
- asprintf(&ldap_exp, "(objectSid=%s)", sidstr);
+ if (asprintf(&ldap_exp, "(objectSid=%s)", sidstr) == -1) {
+ status = NT_STATUS_NO_MEMORY;
+ goto done;
+ }
rc = ads_search_retry(ads, &msg, ldap_exp, attrs);
free(ldap_exp);
free(sidstr);
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
index 2f4a6ffe568..1ae7966bc38 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -3852,7 +3852,9 @@ static TDB_DATA make_tdc_key( const char *domain_name )
}
- asprintf( &keystr, "TRUSTDOMCACHE/%s", domain_name );
+ if (asprintf( &keystr, "TRUSTDOMCACHE/%s", domain_name ) == -1) {
+ return key;
+ }
key = string_term_tdb_data(keystr);
return key;