diff options
| author | Martin Willi <martin@revosec.ch> | 2012-10-04 14:45:10 +0200 |
|---|---|---|
| committer | Martin Willi <martin@revosec.ch> | 2012-10-09 11:54:00 +0200 |
| commit | 82f3549fe2c841d4b0cc6355a4e7519c838f0bd4 (patch) | |
| tree | 94bfb8aaccb385ea0fd637a5a18ceedc240b2876 /src/libcharon/plugins/stroke | |
| parent | f4263eaef6666ddd21f0209539b534a8c6fde01e (diff) | |
| download | strongswan-82f3549fe2c841d4b0cc6355a4e7519c838f0bd4.tar.bz2 strongswan-82f3549fe2c841d4b0cc6355a4e7519c838f0bd4.tar.xz | |
Fix leak of PINs from ipsec.secrets
Diffstat (limited to 'src/libcharon/plugins/stroke')
| -rw-r--r-- | src/libcharon/plugins/stroke/stroke_cred.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcharon/plugins/stroke/stroke_cred.c b/src/libcharon/plugins/stroke/stroke_cred.c index ebc09c0d5..5ecaa35ef 100644 --- a/src/libcharon/plugins/stroke/stroke_cred.c +++ b/src/libcharon/plugins/stroke/stroke_cred.c @@ -666,7 +666,7 @@ static bool load_pin(private_stroke_cred_t *this, chunk_t line, int line_nr, free(secret.ptr); if (!prompt) { /* no IO channel to prompt, skip */ - free(chunk.ptr); + chunk_clear(&chunk); return TRUE; } /* use callback credential set to prompt for the pin */ @@ -719,6 +719,7 @@ static bool load_pin(private_stroke_cred_t *this, chunk_t line, int line_nr, lib->credmgr->remove_local_set(lib->credmgr, &cb->set); cb->destroy(cb); } + chunk_clear(&chunk); if (key) { |
