X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fdropin.c;h=74e5676ffe6630d7fb51f42bfd648850c8d0060a;hb=22ae0c3549628739ca7c40e48ce1a276469ded92;hp=a4f7a65d5893ba3f9303b74d9c521d1c8cb6daa4;hpb=aebaaa8db80ec3931346af710f2182d129c74c41;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;