Proper cleanup if IDs in ipsec.secrets cannot be parsed.

This commit is contained in:
Tobias Brunner 2011-04-14 15:38:43 +02:00
parent 3c3c832a10
commit b0fd7d1482
1 changed files with 2 additions and 0 deletions

View File

@ -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)