summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortb <tb@openbsd.org>2020-11-09 04:13:32 +0000
committertb <tb@openbsd.org>2020-11-09 04:13:32 +0000
commitcb873a5ff0b7df2089cfbc234f4ae084fabd6502 (patch)
tree53084e76666f54418b5435932c15d7c097d41417
parentvblank seqlock is used from interrupt context so use IPL_TTY (diff)
downloadwireguard-openbsd-cb873a5ff0b7df2089cfbc234f4ae084fabd6502.tar.xz
wireguard-openbsd-cb873a5ff0b7df2089cfbc234f4ae084fabd6502.zip
Don't leak domain when freeing block list nodes
Domains contained in the block list file were not correctly freed. This would grow the frontend process by the size of the blocklist file on each config reload. ok florian
-rw-r--r--sbin/unwind/frontend.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/unwind/frontend.c b/sbin/unwind/frontend.c
index aba1edc4551..906d37ad391 100644
--- a/sbin/unwind/frontend.c
+++ b/sbin/unwind/frontend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frontend.c,v 1.53 2020/11/05 16:22:59 florian Exp $ */
+/* $OpenBSD: frontend.c,v 1.54 2020/11/09 04:13:32 tb Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -1194,6 +1194,7 @@ free_bl(void)
for (n = RB_MIN(bl_tree, &bl_head); n != NULL; n = nxt) {
nxt = RB_NEXT(bl_tree, &bl_head, n);
RB_REMOVE(bl_tree, &bl_head, n);
+ free(n->domain);
free(n);
}
}