From: Azat Khuzhin Date: Mon, 28 Jan 2019 22:23:02 +0000 (+0300) Subject: s/http-server: fix cleanup routines X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=afdccee9b3648a76e119fb4d5f922191cd09d748;p=libevent s/http-server: fix cleanup routines Fixes: bdd71f18 ("s/http-server: graceful cleanup") --- 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; } }