summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_esp_old.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-11-15 00:07:10 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-11-15 00:07:10 +0000
commitf7f2b7d1eead7023651e706ae944fb123704a8ff (patch)
tree8c504b93f6a43367e07349815000137f29c0d16b /sys/netinet/ip_esp_old.c
parentd098e9c0ee094138f6389c98e1e5cce0d3710acd (diff)
fix memory management errors
Diffstat (limited to 'sys/netinet/ip_esp_old.c')
-rw-r--r--sys/netinet/ip_esp_old.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/ip_esp_old.c b/sys/netinet/ip_esp_old.c
index 07f89c937bf..5df83f3eba6 100644
--- a/sys/netinet/ip_esp_old.c
+++ b/sys/netinet/ip_esp_old.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_esp_old.c,v 1.10 1997/11/04 09:11:13 provos Exp $ */
+/* $OpenBSD: ip_esp_old.c,v 1.11 1997/11/15 00:07:09 deraadt Exp $ */
/*
* The author of this code is John Ioannidis, ji@tla.org,
@@ -279,7 +279,11 @@ esp_old_zeroize(struct tdb *tdbp)
if (encdebug)
printf("esp_old_zeroize(): freeing memory\n");
#endif /* ENCDEBUG */
- FREE(tdbp->tdb_xdata, M_XDATA);
+ if (tdbp->tdb_xdata)
+ {
+ FREE(tdbp->tdb_xdata, M_XDATA);
+ tdbp->tdb_xdata = NULL;
+ }
return 0;
}