diff --git a/html.c b/html.c index 4161d83..c7c1b85 100644 --- a/html.c +++ b/html.c @@ -458,7 +458,7 @@ d_char *html_entry(snac *snac, d_char *s, char *msg, xs_set *seen, int level) if (url != NULL) { xs *s1 = xs_fmt("

\"%s\"/

\n", - url, name == NULL ? "" : name); + url, xs_is_null(name) ? "" : name); s = xs_str_cat(s, s1); } diff --git a/httpd.c b/httpd.c index 3ff13c6..c6959e6 100644 --- a/httpd.c +++ b/httpd.c @@ -106,6 +106,12 @@ void httpd_connection(int rs) req = xs_httpd_request(f, &payload, &p_size); + if (req == NULL) { + /* probably because a timeout */ + fclose(f); + return; + } + method = xs_dict_get(req, "method"); q_path = xs_dup(xs_dict_get(req, "path"));