Thread (7 messages) flat view 7 messages, 2 authors, 2021-01-03
STALE2051d

[PATCH iproute2 2/3] dcb: Plug a leaking DCB socket buffer

From: Petr Machata <hidden>
Date: 2021-01-01 23:28:13
Subsystem: the rest · Maintainer: Linus Torvalds

DCB socket buffer is allocated in dcb_init(), but never freed(). Free it
in dcb_fini().

Signed-off-by: Petr Machata <redacted>
---
 dcb/dcb.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/dcb/dcb.c b/dcb/dcb.c
index f5c62790e27e..0e3c87484f2a 100644
--- a/dcb/dcb.c
+++ b/dcb/dcb.c
@@ -38,6 +38,7 @@ static void dcb_fini(struct dcb *dcb)
 {
 	delete_json_obj_plain();
 	mnl_socket_close(dcb->nl);
+	free(dcb->buf);
 }
 
 static struct dcb *dcb_alloc(void)
-- 
2.26.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help