Download raw body.
gotweb: return error instead of NULL
Hi It looks wrong to return NULL here. First error is set and not used, and second *gw_dir (which is set to NULL) is dereferenced by the next function without checking for NULL. Best, Martin diff --git a/gotweb/gotweb.c b/gotweb/gotweb.c index ecbcccb4..1bfc5141 100644 --- a/gotweb/gotweb.c +++ b/gotweb/gotweb.c @@ -2099,7 +2099,7 @@ gw_init_gw_dir(struct gw_dir **gw_dir, const char *dir) error = got_error_from_errno("asprintf"); free(*gw_dir); *gw_dir = NULL; - return NULL; + return error; } return NULL;
gotweb: return error instead of NULL