X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbus-proxyd%2Fbus-proxyd.c;h=478dd78744eb6d6639cbb49f2ebf2d30b44d438d;hb=95eb099fa8a90212ed2aef82bad360f147bc19c2;hp=e07761aeb937cc261cbee9f5bc8ec10ae18682c1;hpb=0a6f50c0afdfc434b492493bd9efab20cbee8623;p=elogind.git diff --git a/src/bus-proxyd/bus-proxyd.c b/src/bus-proxyd/bus-proxyd.c index e07761aeb..478dd7874 100644 --- a/src/bus-proxyd/bus-proxyd.c +++ b/src/bus-proxyd/bus-proxyd.c @@ -69,7 +69,7 @@ static ClientContext *client_context_free(ClientContext *c) { if (!c) return NULL; - close(c->fd); + safe_close(c->fd); free(c); return NULL; @@ -101,6 +101,8 @@ static void *run_client(void *userdata) { if (r < 0) goto exit; + c->fd = -1; + /* set comm to "p$PIDu$UID" and suffix with '*' if truncated */ r = snprintf(comm, sizeof(comm), "p" PID_FMT "u" UID_FMT, p->local_creds.pid, p->local_creds.uid); if (r >= (ssize_t)sizeof(comm))