projects
/
cyrus-sasl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4b26e73
)
Cleanup provider immediately if initialisation fails
author
Luke Howard
<lukeh@padl.com>
Mon, 20 Sep 2010 14:41:33 +0000
(16:41 +0200)
committer
Luke Howard
<lukeh@padl.com>
Mon, 20 Sep 2010 14:41:33 +0000
(16:41 +0200)
mech_eap/util_attr.cpp
patch
|
blob
|
history
diff --git
a/mech_eap/util_attr.cpp
b/mech_eap/util_attr.cpp
index
0fe8d17
..
2e92acc
100644
(file)
--- a/
mech_eap/util_attr.cpp
+++ b/
mech_eap/util_attr.cpp
@@
-137,8
+137,11
@@
gss_eap_attr_ctx::initFromExistingContext(const gss_eap_attr_ctx *manager)
ret = provider->initFromExistingContext(this,
manager->m_providers[i]);
ret = provider->initFromExistingContext(this,
manager->m_providers[i]);
- if (ret == false)
+ if (ret == false) {
+ delete provider;
+ m_providers[i] = NULL;
break;
break;
+ }
}
return ret;
}
return ret;
@@
-160,8
+163,11
@@
gss_eap_attr_ctx::initFromGssContext(const gss_cred_id_t cred,
continue;
ret = provider->initFromGssContext(this, cred, ctx);
continue;
ret = provider->initFromGssContext(this, cred, ctx);
- if (ret == false)
+ if (ret == false) {
+ delete provider;
+ m_providers[i] = NULL;
break;
break;
+ }
}
return ret;
}
return ret;
@@
-189,8
+195,11
@@
gss_eap_attr_ctx::initFromBuffer(const gss_buffer_t buffer)
ret = provider->initFromGssContext(this,
GSS_C_NO_CREDENTIAL,
GSS_C_NO_CONTEXT);
ret = provider->initFromGssContext(this,
GSS_C_NO_CREDENTIAL,
GSS_C_NO_CONTEXT);
- if (ret == false)
+ if (ret == false) {
+ delete provider;
+ m_providers[i] = NULL;
break;
break;
+ }
}
return ret;
}
return ret;