echo_srv: Check for a valid pidfile pointer
authorAndreas Schneider <asn@cryptomilk.org>
Mon, 1 Oct 2018 19:23:31 +0000 (21:23 +0200)
committerAndreas Schneider <asn@samba.org>
Tue, 23 Oct 2018 13:39:33 +0000 (15:39 +0200)
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
tests/echo_srv.c

index 555c3b4685ee869eab07f6999200bcc25ed40c05..9a81c423b58124c07f5f283aa01eebf3f3c374d8 100644 (file)
@@ -916,7 +916,7 @@ int main(int argc, char **argv)
     echo(sock, &opts);
     close(sock);
 
-    if (opts.daemon) {
+    if (opts.daemon && opts.pidfile != NULL) {
         unlink(opts.pidfile);
     }