diff options
author | Azat Khuzhin <azat@libevent.org> | 2019-01-29 01:23:02 +0300 |
---|---|---|
committer | Azat Khuzhin <azat@libevent.org> | 2019-01-29 01:23:02 +0300 |
commit | afdccee9b3648a76e119fb4d5f922191cd09d748 (patch) | |
tree | 52e7d1924c4fb1c7555487744b879acfb667aeef /sample/http-server.c | |
parent | 7bfe93886d7fccad2d9a6c76cf47c47d3668f9d1 (diff) | |
download | libevent-afdccee9b3648a76e119fb4d5f922191cd09d748.tar.gz |
s/http-server: fix cleanup routines
Fixes: bdd71f18 ("s/http-server: graceful cleanup")
Diffstat (limited to 'sample/http-server.c')
-rw-r--r-- | sample/http-server.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sample/http-server.c b/sample/http-server.c index e2fc8499..75379968 100644 --- a/sample/http-server.c +++ b/sample/http-server.c @@ -435,6 +435,7 @@ main(int argc, char **argv) if (!handle) { fprintf(stderr, "couldn't bind to port %d. Exiting.\n", o.port); ret = 1; + goto err; } { @@ -462,6 +463,7 @@ main(int argc, char **argv) fprintf(stderr, "Weird address family %d\n", ss.ss_family); ret = 1; + goto err; } addr = evutil_inet_ntop(ss.ss_family, inaddr, addrbuf, sizeof(addrbuf)); @@ -472,6 +474,7 @@ main(int argc, char **argv) } else { fprintf(stderr, "evutil_inet_ntop failed\n"); ret = 1; + goto err; } } |