summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/sa.c
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-01-22 08:14:25 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-01-22 08:14:25 +0000
commit2c5c7f9e2f0698ba4319def98b7e9ff4f8f410f1 (patch)
tree5e1960257d408e056910b1b51a64520f71f4255c /sbin/isakmpd/sa.c
parentf419b091e2e4e6d35a4d4488d6065686e31ed59d (diff)
Fix memory leak on exchange free.
Diffstat (limited to 'sbin/isakmpd/sa.c')
-rw-r--r--sbin/isakmpd/sa.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sbin/isakmpd/sa.c b/sbin/isakmpd/sa.c
index d96d529b3a9..93bfe78a5f1 100644
--- a/sbin/isakmpd/sa.c
+++ b/sbin/isakmpd/sa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sa.c,v 1.34 2001/01/14 23:40:01 angelos Exp $ */
+/* $OpenBSD: sa.c,v 1.35 2001/01/22 08:14:24 angelos Exp $ */
/* $EOM: sa.c,v 1.112 2000/12/12 00:22:52 niklas Exp $ */
/*
@@ -39,6 +39,11 @@
#include <stdlib.h>
#include <string.h>
+#if defined(USE_KEYNOTE) || defined(USE_POLICY)
+#include <regex.h>
+#include <keynote.h>
+#endif /* USE_KEYNOTE || USE_POLICY */
+
#include "sysdep.h"
#include "cookie.h"
@@ -52,6 +57,7 @@
#include "transport.h"
#include "util.h"
#include "cert.h"
+#include "policy.h"
/* Initial number of bits from the cookies used as hash. */
#define INITIAL_BUCKET_BITS 6
@@ -503,7 +509,6 @@ sa_free_aux (struct sa *sa)
LOG_DBG ((LOG_SA, 70, "sa_free_aux: SA %p removed from SA list", sa));
sa_release (sa);
}
-
/* Raise the reference count of SA. */
void
sa_reference (struct sa *sa)
@@ -550,9 +555,9 @@ sa_release (struct sa *sa)
}
if (sa->recv_key)
free (sa->recv_key);
-#if defined(POLICY) || defined(KEYNOTE)
+#if defined(USE_POLICY) || defined(USE_KEYNOTE)
if (sa->policy_id != -1)
- LK (kn_close, (sa->policy-id));
+ LK (kn_close, (sa->policy_id));
#endif
if (sa->name)
free (sa->name);