summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_ah_new.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_ah_new.c
parentd098e9c0ee094138f6389c98e1e5cce0d3710acd (diff)
fix memory management errors
Diffstat (limited to 'sys/netinet/ip_ah_new.c')
-rw-r--r--sys/netinet/ip_ah_new.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/ip_ah_new.c b/sys/netinet/ip_ah_new.c
index 4365075a1f5..79c7e1d3bfc 100644
--- a/sys/netinet/ip_ah_new.c
+++ b/sys/netinet/ip_ah_new.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ah_new.c,v 1.11 1997/11/04 09:11:01 provos Exp $ */
+/* $OpenBSD: ip_ah_new.c,v 1.12 1997/11/15 00:07:07 deraadt Exp $ */
/*
* The author of this code is John Ioannidis, ji@tla.org,
@@ -245,7 +245,11 @@ ah_new_zeroize(struct tdb *tdbp)
if (encdebug)
printf("ah_new_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;
}