]> granicus.if.org Git - procps-ng/commitdiff
pmap: Plug mem- and fd-leak in one_proc().
authorQualys Security Advisory <qsa@qualys.com>
Thu, 1 Jan 1970 00:00:00 +0000 (00:00 +0000)
committerCraig Small <csmall@enc.com.au>
Fri, 18 May 2018 21:32:22 +0000 (07:32 +1000)
pmap.c

diff --git a/pmap.c b/pmap.c
index ae1aea99bfea3fb5574efe7f9f13d42936db4757..569c10ee882adbfff73dc7ae63ff758052701c78 100644 (file)
--- a/pmap.c
+++ b/pmap.c
@@ -547,6 +547,7 @@ static int one_proc(proc_t * p)
 
        if (X_option || c_option) {
                print_extended_maps(fp);
+               fclose(fp);
                return 0;
        }