Hi,

This time a memory leak is within the 'get_initial_file' function
(info.c:175).

Storage is returned from allocation function 'get_manpage_node' into
'man_node' pointer variable (line 290). If man_node is not NULL,
'return' is called without freeing the memory (line 298).

Steps to reproduce:
1) run '$ valgrind --leak-check=full fetchmail'
        (or any other argument, which doesn't have info page and fall
        backs to man page)
2) quit info and see valgrind summary

Attached patch resolves the issue.

Best regards,
Vita

-- 
Vitezslav Crhonek
Software Engineer
Red Hat
diff -up ./info/info.c.orig ./info/info.c
--- ./info/info.c.orig	2018-07-26 14:08:40.758359483 +0200
+++ ./info/info.c	2018-07-26 14:15:53.461649338 +0200
@@ -295,6 +295,7 @@ get_initial_file (int *argc, char ***arg
              ref_index, ref_list, ref_slots, 2);
 
           initial_file = MANPAGE_FILE_BUFFER_NAME;
+          free (man_node);
           return;
         }
     }

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to