aboutsummaryrefslogtreecommitdiff
path: root/src/librc/librc-daemon.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-04-21 10:56:28 +0000
committerRoy Marples <roy@marples.name>2008-04-21 10:56:28 +0000
commit54d7aa39dd54ceaf7b7e509b3792bace9f34bad0 (patch)
treeca94ef0282dae7eec95cff79b26dbbde3dc390a2 /src/librc/librc-daemon.c
parentdc5d63aa9709f542e3a9cb7846f7a99cf60af0f6 (diff)
If we don't have permission to inspect the pidfile, don't report crashed. Gentoo #218028.
Diffstat (limited to 'src/librc/librc-daemon.c')
-rw-r--r--src/librc/librc-daemon.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/librc/librc-daemon.c b/src/librc/librc-daemon.c
index a58ba15c..bc632463 100644
--- a/src/librc/librc-daemon.c
+++ b/src/librc/librc-daemon.c
@@ -561,14 +561,13 @@ bool rc_service_daemons_crashed(const char *service)
if ((fp = fopen(pidfile, "r"))) {
if (fscanf(fp, "%d", &pid) == 1)
retval = false;
-
fclose (fp);
}
free(pidfile);
pidfile = NULL;
/* We have the pid, so no need to match on name */
- free (name);
+ free(name);
name = NULL;
} else {
if (exec) {