In function readfile(), the buffer buf is free'd when readall() fails.  This free can cause a crash, if the buffer passed by user of function is not malloc'ed one.

names_to_pid() is one usecase example here.
1 file changed