summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2008-08-26 15:39:27 +0000
committerkettenis <kettenis@openbsd.org>2008-08-26 15:39:27 +0000
commit7a86a449a4b85b2b8a78306b39dcade5fe817fb4 (patch)
tree5af3b3d745fac8f86e220396cb8da3aa63e4df25 /sys
parentwe need to call pf_pkt_addr_changed here too. found by david (diff)
downloadwireguard-openbsd-7a86a449a4b85b2b8a78306b39dcade5fe817fb4.tar.xz
wireguard-openbsd-7a86a449a4b85b2b8a78306b39dcade5fe817fb4.zip
Plug potential memory leak.
"looks sane to me" otto@, ok miod@
Diffstat (limited to 'sys')
-rw-r--r--sys/uvm/uvm_amap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/uvm/uvm_amap.c b/sys/uvm/uvm_amap.c
index a3f74b64019..81e315831e5 100644
--- a/sys/uvm/uvm_amap.c
+++ b/sys/uvm/uvm_amap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_amap.c,v 1.40 2007/09/07 15:00:20 art Exp $ */
+/* $OpenBSD: uvm_amap.c,v 1.41 2008/08/26 15:39:27 kettenis Exp $ */
/* $NetBSD: uvm_amap.c,v 1.27 2000/11/25 06:27:59 chs Exp $ */
/*
@@ -398,6 +398,11 @@ amap_extend(struct vm_map_entry *entry, vsize_t addsize)
if (newover != NULL) {
free(newover, M_UVMAMAP);
}
+#ifdef UVM_AMAP_PPREF
+ if (newppref != NULL) {
+ free(newppref, M_UVMAMAP);
+ }
+#endif
return (ENOMEM);
}
KASSERT(amap->am_maxslot < slotneed);