diff mbox series

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

Message ID 664c9ab05595c821f2295fbebc982f82c3e0d884.1609543363.git.me@pmachata.org (mailing list archive)
State Superseded
Delegated to: David Ahern
Headers show
Series dcb: Fixes | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Petr Machata Jan. 1, 2021, 11:25 p.m. UTC
DCB socket buffer is allocated in dcb_init(), but never freed(). Free it
in dcb_fini().

Signed-off-by: Petr Machata <me@pmachata.org>
---
 dcb/dcb.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

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)