diff options
author | Bo Yang <boyang@samba.org> | 2009-07-18 14:07:33 +0800 |
---|---|---|
committer | Bo Yang <boyang@samba.org> | 2009-07-18 14:12:26 +0800 |
commit | f394fa7766d394f30d35da4191a9ec7b09693a9c (patch) | |
tree | f202af92a5353dcc53412e1e1d11cf46b08e77f9 /nsswitch | |
parent | ffbcf3b491293db92141f7936e3fefc81066e730 (diff) | |
download | samba-f394fa7766d394f30d35da4191a9ec7b09693a9c.tar.gz samba-f394fa7766d394f30d35da4191a9ec7b09693a9c.tar.bz2 samba-f394fa7766d394f30d35da4191a9ec7b09693a9c.zip |
s3: add failure check.
Signed-off-by: Bo Yang <boyang@samba.org>
Diffstat (limited to 'nsswitch')
-rw-r--r-- | nsswitch/pam_winbind.c | 5 |
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 */ |