diff options
author | Martin Willi <martin@strongswan.org> | 2008-11-12 08:27:48 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2008-11-12 08:27:48 +0000 |
commit | 9fa5c75f48bd65db556d8209084da14cb4001503 (patch) | |
tree | f1d9074e3b964d0801d91457d6c660dad7acd1ce /src/charon/config/proposal.c | |
parent | 137484895a4ca8d78e05e5055400d38c7eed13f6 (diff) | |
download | strongswan-9fa5c75f48bd65db556d8209084da14cb4001503.tar.bz2 strongswan-9fa5c75f48bd65db556d8209084da14cb4001503.tar.xz |
fixing keylength bug at the right place:
we usually don't touch output parameters if operations fails
Diffstat (limited to 'src/charon/config/proposal.c')
-rw-r--r-- | src/charon/config/proposal.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/charon/config/proposal.c b/src/charon/config/proposal.c index 1421d5e97..11143a4a6 100644 --- a/src/charon/config/proposal.c +++ b/src/charon/config/proposal.c @@ -210,21 +210,13 @@ static bool get_algorithm(private_proposal_t *this, transform_type_t type, u_int16_t *alg, u_int16_t *key_size) { enumerator_t *enumerator; - bool found; + bool found = FALSE; enumerator = create_enumerator(this, type); if (enumerator->enumerate(enumerator, alg, key_size)) { found = TRUE; } - else - { - if (key_size) - { - *key_size = 0; - } - found = FALSE; - } enumerator->destroy(enumerator); return found; } |