aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/start_stop_daemon.c1
1 files changed, 1 insertions, 0 deletions
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;
}