From eb5536bdaaead2120dee6898ab36207b10def76f Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Sun, 25 Oct 2020 01:29:32 +0000 Subject: [PATCH] fix launching when a pidfile is unspecified... --- ggatessh/ggatessh.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ggatessh/ggatessh.c b/ggatessh/ggatessh.c index dedeab8..06c766d 100644 --- a/ggatessh/ggatessh.c +++ b/ggatessh/ggatessh.c @@ -757,7 +757,9 @@ ggatessh_makepidfile(void) if (ggatessh_pidfile == NULL) { asprintf(&ggatessh_pidfile, _PATH_VARRUN "/ggatessh.ggate%d.pid", unit); - err(EXIT_FAILURE, "Cannot allocate memory for pidfile"); + if (ggatessh_pidfile == NULL) + err(EXIT_FAILURE, + "Cannot allocate memory for pidfile"); } pfh = pidfile_open(ggatessh_pidfile, 0600, &otherpid); if (pfh == NULL) {