From: Tobias Brunner Date: Thu, 14 Apr 2011 13:38:43 +0000 (+0200) Subject: Proper cleanup if IDs in ipsec.secrets cannot be parsed. X-Git-Tag: 4.5.2~129 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b0fd7d14824b06310a38cb16eaa347ebca803b4f;p=thirdparty%2Fstrongswan.git Proper cleanup if IDs in ipsec.secrets cannot be parsed. --- 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)