From bf5176e815c8c223930711b05e80a1aafa906fd7 Mon Sep 17 00:00:00 2001 From: Love Hornquist Astrand Date: Thu, 30 Jul 2009 07:59:24 +0200 Subject: [PATCH] Check return value for allocation function [CID-180] --- kcm/acquire.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kcm/acquire.c b/kcm/acquire.c index f6ed5d0de..6d211c467 100644 --- a/kcm/acquire.c +++ b/kcm/acquire.c @@ -87,7 +87,9 @@ kcm_ccache_acquire(krb5_context context, realm = krb5_principal_get_realm(context, ccache->client); - krb5_get_init_creds_opt_alloc(context, &opt); + ret = krb5_get_init_creds_opt_alloc(context, &opt); + if (ret) + goto out; krb5_get_init_creds_opt_set_default_flags(context, "kcm", realm, opt); if (ccache->tkt_life != 0) krb5_get_init_creds_opt_set_tkt_life(opt, ccache->tkt_life);