Thread (12 messages) 12 messages, 2 authors, 2021-01-01
STALE2010d

[PATCH iproute2-next 2/9] dcb: Plug a leaking DCB socket buffer

From: Petr Machata <hidden>
Date: 2020-12-23 18:27:21
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.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help