aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2011-12-13 11:39:54 +0100
committerMartin Willi <martin@revosec.ch>2012-03-20 17:31:20 +0100
commite33510f8a32ffe72f6c239919058e6eb120ef070 (patch)
treed77aa8534530b63086a7e6e7ab16dc5939b256b9 /src/libcharon/plugins
parent45956d15ea6d53ff7d1917a8a063e98535987dfe (diff)
downloadstrongswan-e33510f8a32ffe72f6c239919058e6eb120ef070.tar.bz2
strongswan-e33510f8a32ffe72f6c239919058e6eb120ef070.tar.xz
Fixed leak of shared keys in xauth-generic plugin
Diffstat (limited to 'src/libcharon/plugins')
-rw-r--r--src/libcharon/plugins/xauth_generic/xauth_generic.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcharon/plugins/xauth_generic/xauth_generic.c b/src/libcharon/plugins/xauth_generic/xauth_generic.c
index cac740a34..981ab77d0 100644
--- a/src/libcharon/plugins/xauth_generic/xauth_generic.c
+++ b/src/libcharon/plugins/xauth_generic/xauth_generic.c
@@ -73,6 +73,7 @@ METHOD(xauth_method_t, process_peer, status_t,
CONFIGURATION_ATTRIBUTE_V1, XAUTH_USER_NAME, user));
cp->add_attribute(cp, configuration_attribute_create_chunk(
CONFIGURATION_ATTRIBUTE_V1, XAUTH_USER_PASSWORD, pass));
+ shared->destroy(shared);
*out = cp;
return NEED_MORE;
}
@@ -151,6 +152,7 @@ METHOD(xauth_method_t, process_server, status_t,
{
DBG2(DBG_IKE, "authentication of '%Y' with XAuth successful", peer);
}
+ DESTROY_IF(shared);
DESTROY_IF(id);
return status;
}