]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
main: don't try to open unspecified pidfile
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 12 Nov 2019 17:10:25 +0000 (18:10 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 19 Nov 2019 13:34:51 +0000 (14:34 +0100)
main.c

diff --git a/main.c b/main.c
index 108aea78660f1b706926c2c2020aee231f093bc6..e0b5c48ad280b32375cb5e9d50ef92da50692b02 100644 (file)
--- a/main.c
+++ b/main.c
@@ -255,6 +255,9 @@ check_pidfile(void)
   FILE *in;
   int pid, count;
   
+  if (!pidfile[0])
+    return;
+
   in = UTI_OpenFile(NULL, pidfile, NULL, 'r', 0);
   if (!in)
     return;