From 4abe4a51a066af43e8ac3439f4acdbf0cc687a36 Mon Sep 17 00:00:00 2001 From: Qualys Security Advisory Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] 0019-pidof: Do not memleak pidof_root if multiple -c options. --- pidof.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pidof.c b/pidof.c index 509bafac..c65aaadb 100644 --- a/pidof.c +++ b/pidof.c @@ -324,6 +324,7 @@ int main (int argc, char **argv) case 'c': if (geteuid() == 0) { opt_rootdir_check = 1; + safe_free(pidof_root); pidof_root = pid_link(getpid(), "root"); } break;