projects
/
moonshot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8988624
)
plug leaks in 898862478f9adecfc5580814cf1296464c448b1b
author
Luke Howard
<lukeh@padl.com>
Mon, 4 Apr 2011 15:20:22 +0000
(
01:20
+1000)
committer
Luke Howard
<lukeh@padl.com>
Mon, 4 Apr 2011 15:20:22 +0000
(
01:20
+1000)
mech_eap/util_saml.cpp
patch
|
blob
|
history
diff --git
a/mech_eap/util_saml.cpp
b/mech_eap/util_saml.cpp
index
9658bf0
..
afce7f7
100644
(file)
--- a/
mech_eap/util_saml.cpp
+++ b/
mech_eap/util_saml.cpp
@@
-678,16
+678,20
@@
gss_eap_saml_attr_provider::getAttribute(const gss_buffer_t attr,
ssize_t binaryLen;
value->value = GSSEAP_MALLOC(stringValueLen);
ssize_t binaryLen;
value->value = GSSEAP_MALLOC(stringValueLen);
- if (value->value == NULL)
+ if (value->value == NULL) {
+ GSSEAP_FREE(stringValue);
throw new std::bad_alloc;
throw new std::bad_alloc;
+ }
binaryLen = base64Decode(stringValue, value->value);
if (binaryLen < 0) {
GSSEAP_FREE(value->value);
binaryLen = base64Decode(stringValue, value->value);
if (binaryLen < 0) {
GSSEAP_FREE(value->value);
+ GSSEAP_FREE(stringValue);
value->value = NULL;
return false;
}
value->length = binaryLen;
value->value = NULL;
return false;
}
value->length = binaryLen;
+ GSSEAP_FREE(stringValue);
} else {
value->value = stringValue;
value->length = stringValueLen;
} else {
value->value = stringValue;
value->length = stringValueLen;