]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Proper cleanup if IDs in ipsec.secrets cannot be parsed.
authorTobias Brunner <tobias@strongswan.org>
Thu, 14 Apr 2011 13:38:43 +0000 (15:38 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 14 Apr 2011 16:11:45 +0000 (18:11 +0200)
src/libcharon/plugins/stroke/stroke_cred.c

index 5a6d8febd7395f874208494ffb539f3ac52a661a..e7c7e9c0777012b755972106d24eec7209c9195f 100644 (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)