From ab8b3881a0b568edd137d4c0b51006ade04e93a0 Mon Sep 17 00:00:00 2001 From: Qualys Security Advisory Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] 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 7394c8a6..0220c888 100644 --- a/pidof.c +++ b/pidof.c @@ -318,6 +318,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;