From f394fa7766d394f30d35da4191a9ec7b09693a9c Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Sat, 18 Jul 2009 14:07:33 +0800 Subject: s3: add failure check. Signed-off-by: Bo Yang --- nsswitch/pam_winbind.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'nsswitch/pam_winbind.c') 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 */ -- cgit