summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-12-31 16:30:11 -0800
committerJeremy Allison <jra@samba.org>2008-12-31 16:30:11 -0800
commitbb23f5725f538d14b2ccec0463cfb1136be3ebd0 (patch)
tree392ffa5f6e85aa85ee05c7fbdd0dbeaee8aee5cc /source3/winbindd
parentd99aeed50f1221561d8d935777216d372a2a4a71 (diff)
downloadsamba-bb23f5725f538d14b2ccec0463cfb1136be3ebd0.tar.gz
samba-bb23f5725f538d14b2ccec0463cfb1136be3ebd0.tar.bz2
samba-bb23f5725f538d14b2ccec0463cfb1136be3ebd0.zip
Fix more asprintf and "ignoring return code" warnings from gcc 4.3.
Jeremy.
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 5c7d491849..a508682e5e 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 2f4a6ffe56..1ae7966bc3 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;