commit - 67dcc610aece88139668be12f4ecb5db915d1252
commit + b861c60c7ca955d7dd5c12f192dba80578fee400
blob - 600e2c02a45902c21891d50646205887049d4dbc
blob + ba4c708156713a3772a13a7b3f3416fb240c5591
--- 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;