diff options
author | Andreas Schneider <asn@samba.org> | 2016-10-06 08:16:57 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2016-12-20 13:52:09 +0100 |
commit | 59cc352ac6c5b763ae9cbf81fe367dd8769863d2 (patch) | |
tree | c1de0f9d2f09f60492c45cc1bd1e242e4ec720b2 /auth | |
parent | 9b566e7b3cd5d3efd510076e9fdec97730df4883 (diff) | |
download | samba-59cc352ac6c5b763ae9cbf81fe367dd8769863d2.tar.gz |
auth/credentials: Add talloc NULL check in cli_credentials_set_principal()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'auth')
-rw-r--r-- | auth/credentials/credentials.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/auth/credentials/credentials.c b/auth/credentials/credentials.c index 9a935c6cf39..06648c7f998 100644 --- a/auth/credentials/credentials.c +++ b/auth/credentials/credentials.c @@ -268,7 +268,11 @@ _PUBLIC_ bool cli_credentials_set_principal(struct cli_credentials *cred, { if (obtained >= cred->principal_obtained) { cred->principal = talloc_strdup(cred, val); + if (cred->principal == NULL) { + return false; + } cred->principal_obtained = obtained; + cli_credentials_invalidate_ccache(cred, cred->principal_obtained); return true; } |