aboutgitcodebugslistschat
path: root/passt.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-10-15 20:40:56 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-10-15 20:46:17 +0200
commitbd47b68ebfc26d0a13b4452fb91e52aa3f6f9364 (patch)
tree4cbee0cb3de298099442ae1523fc5fb737cd5de1 /passt.c
parent955fe812dcf3a453936685be78df5c1fcc9ad26b (diff)
downloadpasst-bd47b68ebfc26d0a13b4452fb91e52aa3f6f9364.tar
passt-bd47b68ebfc26d0a13b4452fb91e52aa3f6f9364.tar.gz
passt-bd47b68ebfc26d0a13b4452fb91e52aa3f6f9364.tar.bz2
passt-bd47b68ebfc26d0a13b4452fb91e52aa3f6f9364.tar.lz
passt-bd47b68ebfc26d0a13b4452fb91e52aa3f6f9364.tar.xz
passt-bd47b68ebfc26d0a13b4452fb91e52aa3f6f9364.tar.zst
passt-bd47b68ebfc26d0a13b4452fb91e52aa3f6f9364.zip
passt: Check if a PID file was actually requested before creating it
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'passt.c')
-rw-r--r--passt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/passt.c b/passt.c
index c0d86a5..3e45095 100644
--- a/passt.c
+++ b/passt.c
@@ -248,7 +248,7 @@ static void pid_file(struct ctx *c) {
char pid_buf[12];
int pid_fd, n;
- if (!c->pid_file)
+ if (!*c->pid_file)
return;
pid_fd = open(c->pid_file, O_CREAT | O_WRONLY);