aboutsummaryrefslogtreecommitdiff
path: root/autistdraw.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2014-11-19 03:23:05 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2014-11-19 03:26:03 +0100
commita47ed4fe841ffcef2841fdbc39c7527b17ad3a86 (patch)
tree5f318516982676fa956d125dd85b14c67e5060b8 /autistdraw.c
parentef257d11fbf5207f3cf85c9f3c681be750d5e6e7 (diff)
downloadneetdraw-a47ed4fe841ffcef2841fdbc39c7527b17ad3a86.tar.gz
neetdraw-a47ed4fe841ffcef2841fdbc39c7527b17ad3a86.tar.xz
neetdraw-a47ed4fe841ffcef2841fdbc39c7527b17ad3a86.zip
Update termo
Diffstat (limited to 'autistdraw.c')
-rw-r--r--autistdraw.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/autistdraw.c b/autistdraw.c
index 8ca6dff..77094a0 100644
--- a/autistdraw.c
+++ b/autistdraw.c
@@ -1481,7 +1481,7 @@ initialize_server (app_context_t *app, struct addrinfo *address)
int sock_fd = socket (address->ai_family,
address->ai_socktype, address->ai_protocol);
if (sock_fd == -1)
- goto fail;
+ goto fail_socket;
if (bind (sock_fd, address->ai_addr, address->ai_addrlen)
|| listen (sock_fd, 10))
@@ -1498,6 +1498,8 @@ initialize_server (app_context_t *app, struct addrinfo *address)
return;
fail:
+ xclose (sock_fd);
+fail_socket:
fprintf (stderr, "%s: %s: %s\n",
"error", "initialization failed", strerror (errno));
exit (EXIT_FAILURE);
@@ -1541,7 +1543,6 @@ main (int argc, char *argv[])
}
app.tk = tk;
- termo_set_mouse_proto (tk, termo_guess_mouse_proto (tk));
termo_set_mouse_tracking_mode (tk, TERMO_MOUSE_TRACKING_DRAG);
// Set up curses for our drawing needs