diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-11-15 00:07:10 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-11-15 00:07:10 +0000 |
commit | f7f2b7d1eead7023651e706ae944fb123704a8ff (patch) | |
tree | 8c504b93f6a43367e07349815000137f29c0d16b /sys/netinet | |
parent | d098e9c0ee094138f6389c98e1e5cce0d3710acd (diff) |
fix memory management errors
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_ah_new.c | 8 | ||||
-rw-r--r-- | sys/netinet/ip_ah_old.c | 8 | ||||
-rw-r--r-- | sys/netinet/ip_esp_new.c | 8 | ||||
-rw-r--r-- | sys/netinet/ip_esp_old.c | 8 |
4 files changed, 24 insertions, 8 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; } diff --git a/sys/netinet/ip_ah_old.c b/sys/netinet/ip_ah_old.c index e04ea1456c8..3df42e315ea 100644 --- a/sys/netinet/ip_ah_old.c +++ b/sys/netinet/ip_ah_old.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ah_old.c,v 1.9 1997/11/07 08:27:29 niklas Exp $ */ +/* $OpenBSD: ip_ah_old.c,v 1.10 1997/11/15 00:07:07 deraadt Exp $ */ /* * The author of this code is John Ioannidis, ji@tla.org, @@ -209,7 +209,11 @@ ah_old_zeroize(struct tdb *tdbp) if (encdebug) printf("ah_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; } diff --git a/sys/netinet/ip_esp_new.c b/sys/netinet/ip_esp_new.c index b26e0e9c4da..c442cdda2f7 100644 --- a/sys/netinet/ip_esp_new.c +++ b/sys/netinet/ip_esp_new.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_esp_new.c,v 1.10 1997/11/04 09:11:11 provos Exp $ */ +/* $OpenBSD: ip_esp_new.c,v 1.11 1997/11/15 00:07:08 deraadt Exp $ */ /* * The author of this code is John Ioannidis, ji@tla.org, @@ -441,7 +441,11 @@ esp_new_zeroize(struct tdb *tdbp) if (encdebug) printf("esp_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; } 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; } |