X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fdropin.c;h=74e5676ffe6630d7fb51f42bfd648850c8d0060a;hb=e5b9bd324cc24355956e9e59e5ec2df72cf9d469;hp=a4f7a65d5893ba3f9303b74d9c521d1c8cb6daa4;hpb=88d158e15b9e16b4227b374d8bb4640010670cef;p=tinc diff --git a/src/dropin.c b/src/dropin.c index a4f7a65d..74e5676f 100644 --- a/src/dropin.c +++ b/src/dropin.c @@ -50,8 +50,9 @@ int daemon(int nochdir, int noclose) { } /* If we are the parent, terminate */ - if(pid) + if(pid) { exit(0); + } /* Detach by becoming the new process group leader */ if(setsid() < 0) { @@ -108,8 +109,9 @@ int vasprintf(char **buf, const char *fmt, va_list ap) { status = vsnprintf(*buf, len, fmt, aq); va_end(aq); - if(status >= 0) + if(status >= 0) { *buf = xrealloc(*buf, status + 1); + } if(status > len - 1) { len = status + 1;