summaryrefslogtreecommitdiff
path: root/sbin/iked
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2012-12-15 23:18:18 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2012-12-15 23:18:18 +0000
commit0b5d7b7b5f6132e9984f1acae9923c080ed15383 (patch)
tree291f515e69b75e4c2d6b9e8eacf860cbced9aee3 /sbin/iked
parente57758a77a520c457ee824fb1ee04b0828688945 (diff)
Plug two memory leaks when cleaning up the dh/dsa crypto structures.
Diffstat (limited to 'sbin/iked')
-rw-r--r--sbin/iked/crypto.c3
-rw-r--r--sbin/iked/dh.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/sbin/iked/crypto.c b/sbin/iked/crypto.c
index 8a064f399da..2ea501606b5 100644
--- a/sbin/iked/crypto.c
+++ b/sbin/iked/crypto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crypto.c,v 1.7 2012/09/18 12:07:59 reyk Exp $ */
+/* $OpenBSD: crypto.c,v 1.8 2012/12/15 23:18:17 reyk Exp $ */
/* $vantronix: crypto.c,v 1.18 2010/05/28 15:34:35 reyk Exp $ */
/*
@@ -534,6 +534,7 @@ dsa_free(struct iked_dsa *dsa)
}
ibuf_release(dsa->dsa_keydata);
+ free(dsa);
}
struct ibuf *
diff --git a/sbin/iked/dh.c b/sbin/iked/dh.c
index 15f8dd50e22..9f8ea4d3ad9 100644
--- a/sbin/iked/dh.c
+++ b/sbin/iked/dh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dh.c,v 1.8 2012/09/18 12:07:59 reyk Exp $ */
+/* $OpenBSD: dh.c,v 1.9 2012/12/15 23:18:17 reyk Exp $ */
/* $vantronix: dh.c,v 1.13 2010/05/28 15:34:35 reyk Exp $ */
/*
@@ -298,6 +298,7 @@ group_free(struct group *group)
if (group->ec != NULL)
EC_KEY_free(group->ec);
group->spec = NULL;
+ free(group);
}
struct group *