passt: Check if a PID file was actually requested before creating it
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
955fe812dc
commit
bd47b68ebf
1 changed files with 1 additions and 1 deletions
2
passt.c
2
passt.c
|
@ -248,7 +248,7 @@ static void pid_file(struct ctx *c) {
|
||||||
char pid_buf[12];
|
char pid_buf[12];
|
||||||
int pid_fd, n;
|
int pid_fd, n;
|
||||||
|
|
||||||
if (!c->pid_file)
|
if (!*c->pid_file)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pid_fd = open(c->pid_file, O_CREAT | O_WRONLY);
|
pid_fd = open(c->pid_file, O_CREAT | O_WRONLY);
|
||||||
|
|
Loading…
Reference in a new issue