From 2df71cfbeea516523894ad63be9da5c1839ef082 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Sat, 16 Mar 2013 13:45:25 +0100 Subject: flowtop: close dir handle first before returning back Coverty detected that the variable "dir" going out of scope leaks the storage it points to. Thus close the handle first! Signed-off-by: Daniel Borkmann --- flowtop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/flowtop.c b/flowtop.c index 5418aaf..baa0964 100644 --- a/flowtop.c +++ b/flowtop.c @@ -428,6 +428,7 @@ static int walk_process(char *process, struct flow_entry *n) panic("readlink error: %s\n", strerror(errno)); n->procnum = atoi(process); + closedir(dir); return 1; } } -- cgit v1.2.3-54-g00ecf