From b0fd7d14824b06310a38cb16eaa347ebca803b4f Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Thu, 14 Apr 2011 15:38:43 +0200 Subject: [PATCH] Proper cleanup if IDs in ipsec.secrets cannot be parsed. --- src/libcharon/plugins/stroke/stroke_cred.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libcharon/plugins/stroke/stroke_cred.c b/src/libcharon/plugins/stroke/stroke_cred.c index 5a6d8febd7..e7c7e9c077 100644 --- a/src/libcharon/plugins/stroke/stroke_cred.c +++ b/src/libcharon/plugins/stroke/stroke_cred.c @@ -768,6 +768,8 @@ static bool load_shared(private_stroke_cred_t *this, chunk_t line, int line_nr, if (ugh != NULL) { DBG1(DBG_CFG, "line %d: %s", line_nr, ugh); + shared_key->destroy(shared_key); + owners->destroy_offset(owners, offsetof(identification_t, destroy)); return FALSE; } if (id.len == 0) -- 2.47.2