From b9096d9596f9848586b97f165a306743e3a3c494 Mon Sep 17 00:00:00 2001 From: Alberto Bertogli Date: Wed, 12 Sep 2012 23:05:38 +0100 Subject: [PATCH] nmdb: Only unlink the pidfile if we were asked to write it Signed-off-by: Alberto Bertogli --- nmdb/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nmdb/main.c b/nmdb/main.c index 02df38a..7f4596f 100644 --- a/nmdb/main.c +++ b/nmdb/main.c @@ -260,7 +260,8 @@ int main(int argc, char **argv) cache_free(cd); - unlink(settings.pidfile); + if (settings.pidfile) + unlink(settings.pidfile); free_settings(); -- 2.11.4.GIT