server_init: Handle server_address_new() failure.

Closes #3364
This commit is contained in:
Justin M. Keyes 2016-07-18 11:02:13 -04:00
parent d0c0b10b4c
commit 1d8a076157

View File

@ -40,6 +40,10 @@ bool server_init(void)
listen_address = server_address_new(); listen_address = server_address_new();
} }
if (!listen_address) {
return false;
}
bool ok = (server_start(listen_address) == 0); bool ok = (server_start(listen_address) == 0);
if (must_free) { if (must_free) {
xfree((char *) listen_address); xfree((char *) listen_address);