From 170b20bd940ed14b50ca80a13f2f578b937fab5b Mon Sep 17 00:00:00 2001 From: andersen Date: Wed, 5 Jun 2002 07:11:32 +0000 Subject: plug fd leak noticed by Russ Dill -Erik git-svn-id: svn://busybox.net/trunk/busybox@4858 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- init/start_stop_daemon.c | 1 + 1 file changed, 1 insertion(+) (limited to 'init') diff --git a/init/start_stop_daemon.c b/init/start_stop_daemon.c index 29e3d8673..6b090437f 100644 --- a/init/start_stop_daemon.c +++ b/init/start_stop_daemon.c @@ -113,6 +113,7 @@ pid_is_exec(int pid, const char *exec) sprintf(buf, "/proc/%d/cmdline", pid); fp = fopen(buf, "r"); if (fp && fgets (buf, sizeof (buf), fp) ) { + fclose(fp); if (strncmp (buf, exec, strlen(exec)) == 0) return 1; } -- cgit v1.2.3-55-g6feb