From 03ea436e1cb35fdcba8fb6588de209d0a10174e9 Mon Sep 17 00:00:00 2001 From: Ilya Pankratov <90714492+i-pankrat@users.noreply.github.com> Date: Wed, 5 Jun 2024 20:16:01 +0300 Subject: bugfix: fix various resource leaks (#6367) Fix memory and descriptor leaks. Signed-off-by: Ilya Pankratov --- src/firemon/netstats.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/firemon/netstats.c') diff --git a/src/firemon/netstats.c b/src/firemon/netstats.c index 39dc38ec9..e70174b1e 100644 --- a/src/firemon/netstats.c +++ b/src/firemon/netstats.c @@ -152,10 +152,12 @@ static void print_proc(int index, int itv, int col) { struct stat s; if (stat(name, &s) == -1) { // the sandbox doesn't have a --net= option, don't print + free(name); if (cmd) free(cmd); return; } + free(name); // pid char pidstr[11]; -- cgit v1.2.3-70-g09d2