diff options
author | June McEnroe <june@causal.agency> | 2021-12-28 17:28:18 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2021-12-28 17:28:18 -0500 |
commit | ca50ef458987dca1ed29816fce974684e04e35a7 (patch) | |
tree | 8ee97eff999e889bdaf302f988bb7323bcc9bee1 | |
parent | Import refactored xdg.c from pounce (diff) | |
download | litterbox-ca50ef458987dca1ed29816fce974684e04e35a7.tar.gz litterbox-ca50ef458987dca1ed29816fce974684e04e35a7.zip |
Close database before calling tls_close(3)
Calling tls_close(3) after an error potentially results in a SIGPIPE, preventing dbClose() from being called.
-rw-r--r-- | litterbox.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/litterbox.c b/litterbox.c index 5d48b7a..24d5733 100644 --- a/litterbox.c +++ b/litterbox.c @@ -752,8 +752,8 @@ static void handle(struct Message *msg) { } static void atExit(void) { - if (client) tls_close(client); dbClose(); + if (client) tls_close(client); } static void quit(int sig) { |