commit 46aeda9a8bf98388b9a4c1e30dd9badc655537df from: Omar Polo via: Thomas Adam date: Sat Aug 27 17:55:03 2022 UTC gotwebd: fix NULL deref on ENOMEM in gotweb_process_request ok tracey@ commit - df610f472695eeed6f3a618d1833f17f767e9ed1 commit + 46aeda9a8bf98388b9a4c1e30dd9badc655537df blob - 57eaf45343e11c31c878875724b102dbbf4aa774 blob + ed4ed098d767289969a6803e69f59e13fb9f2b85 --- gotwebd/gotweb.c +++ gotwebd/gotweb.c @@ -124,7 +124,7 @@ gotweb_process_request(struct request *c) error = gotweb_init_transport(&c->t); if (error) { log_warnx("%s: %s", __func__, error->msg); - goto err; + return; } /* don't process any further if client disconnected */ if (c->sock->client_status == CLIENT_DISCONNECT) @@ -292,7 +292,7 @@ err: if (html && fcgi_printf(c, "\n") == -1) return; done: - if (c->t->repo != NULL && qs->action != INDEX) + if (c->t->repo != NULL && qs && qs->action != INDEX) got_repo_close(c->t->repo); if (html && srv != NULL) gotweb_render_footer(c);