summaryrefslogtreecommitdiff
path: root/debianutils/start_stop_daemon.c
diff options
context:
space:
mode:
authorEric Andersen2002-06-05 07:11:32 +0000
committerEric Andersen2002-06-05 07:11:32 +0000
commitff7661d9de75d0d92d76fc276b285f4138edf8c8 (patch)
treef8fea7d89d2893a3ed52ee61b0d348834aabeb75 /debianutils/start_stop_daemon.c
parent1fca558799350fb6caff97f55aa6d1237b08fccb (diff)
downloadbusybox-ff7661d9de75d0d92d76fc276b285f4138edf8c8.zip
busybox-ff7661d9de75d0d92d76fc276b285f4138edf8c8.tar.gz
plug fd leak noticed by Russ Dill
-Erik
Diffstat (limited to 'debianutils/start_stop_daemon.c')
-rw-r--r--debianutils/start_stop_daemon.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c
index 29e3d86..6b09043 100644
--- a/debianutils/start_stop_daemon.c
+++ b/debianutils/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;
}