From bd47b68ebfc26d0a13b4452fb91e52aa3f6f9364 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Fri, 15 Oct 2021 20:40:56 +0200 Subject: [PATCH] passt: Check if a PID file was actually requested before creating it Signed-off-by: Stefano Brivio --- passt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);