summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBo Yang <boyang@samba.org>2009-07-18 14:07:33 +0800
committerBo Yang <boyang@samba.org>2009-07-18 14:12:26 +0800
commitf394fa7766d394f30d35da4191a9ec7b09693a9c (patch)
treef202af92a5353dcc53412e1e1d11cf46b08e77f9
parentffbcf3b491293db92141f7936e3fefc81066e730 (diff)
downloadsamba-f394fa7766d394f30d35da4191a9ec7b09693a9c.tar.gz
samba-f394fa7766d394f30d35da4191a9ec7b09693a9c.tar.bz2
samba-f394fa7766d394f30d35da4191a9ec7b09693a9c.zip
s3: add failure check.
Signed-off-by: Bo Yang <boyang@samba.org>
-rw-r--r--nsswitch/pam_winbind.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index f692316fc6..4e84574d25 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -2298,9 +2298,12 @@ static char* winbind_upn_to_username(struct pwb_context *ctx,
}
name = talloc_strdup(ctx, upn);
+ if (!name) {
+ return NULL;
+ }
if ((p = strchr(name, '@')) != NULL) {
*p = 0;
- domain = talloc_strdup(ctx, p + 1);
+ domain = p + 1;
}
/* Convert the UPN to a SID */