commit - 77d846a921200a21660ec0e41f7547d9688366fc
commit + 40e9e6eafb6a79fa350e2586db189e60f6eadcef
blob - 24ae2aae05edb8105dae4835d1d0352ac9219cea
blob + 4d0d8b301f7cd7756fe1d6db3d3615f7a6cfa4b1
--- gotsysd/libexec/gotsys-apply-conf/gotsys-apply-conf.c
+++ gotsysd/libexec/gotsys-apply-conf/gotsys-apply-conf.c
done:
free(confpath);
free(secretspath);
- if (close(GOTSYSD_FILENO_MSG_PIPE) == -1 && err == NULL)
- err = got_error_from_errno("close");
if (conf_fd != -1 && close(conf_fd) == -1 && err == NULL)
err = got_error_from_errno("close");
if (secrets_fd != -1 && close(secrets_fd) == -1 && err == NULL)
- err = got_error_from_errno("close");
- if (err)
+ err = got_error_from_errno("close");
+ if (err) {
+ fprintf(stderr, "%s: %s\n", getprogname(), err->msg);
gotsysd_imsg_send_error(&gotsysd_iev.ibuf, 0, 0, err);
+ }
if (gotsysd_iev.ibuf.fd != -1)
imsgbuf_clear(&gotsysd_iev.ibuf);
if (gotd_iev.ibuf.fd != -1)
imsgbuf_clear(&gotd_iev.ibuf);
+ if (close(GOTSYSD_FILENO_MSG_PIPE) == -1 && err == NULL)
+ err = got_error_from_errno("close");
if (gotd_sock != -1 && close(gotd_sock) == -1 && err == NULL)
err = got_error_from_errno("close");
return err ? 1 : 0;