commit - a81394a7f726210bfe52c33778710d09d1273b5e
commit + d81f9039e7f1d004b3b87dd48c1e787c97ff5a31
blob - 3cd7a419d6fa87f132d95975582a660af2bf8c91
blob + 97d12fc165a7c18166f39eaf45f4bc723c3830b6
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
if (asprintf(&dir_test, "%s/%s/%s",
gw_trans->gw_conf->got_repos_path, gw_dir->name,
- GOTWEB_GOT_DIR) == -1)
- return got_error_from_errno("asprintf");
+ GOTWEB_GOT_DIR) == -1) {
+ dir_test = NULL;
+ error = got_error_from_errno("asprintf");
+ goto errored;
+ }
dt = opendir(dir_test);
if (dt == NULL)
}
if (asprintf(&dir_test, "%s/%s",
- gw_trans->gw_conf->got_repos_path, gw_dir->name) == -1)
- return got_error_from_errno("asprintf");
+ gw_trans->gw_conf->got_repos_path, gw_dir->name) == -1) {
+ error = got_error_from_errno("asprintf");
+ dir_test = NULL;
+ goto errored;
+ }
gw_dir->path = strdup(dir_test);
if (gw_dir->path == NULL) {