commit 122f3af5f64d4a4ff480c3bb5f1c280854d7aba9 from: Stefan Sperling date: Fri Feb 14 10:41:25 2020 UTC add missing error checks in gw_get_header() commit - a4c23852c6c16759785b24201b222fa5c41803c2 commit + 122f3af5f64d4a4ff480c3bb5f1c280854d7aba9 blob - 8ef35b5253653a93b8b07cfc17a654b06ba4ec9e blob + 5d7df739faa8c7fac61aa4fcfe83f2f8f926b0f5 --- gotweb/gotweb.c +++ gotweb/gotweb.c @@ -3231,6 +3231,8 @@ gw_get_header(struct gw_trans *gw_trans, struct gw_hea error = got_object_open_as_commit(&header->commit, header->repo, header->id); + if (error) + return error; } else { struct got_reference *ref; error = got_ref_open(&ref, header->repo, gw_trans->commit, 0); @@ -3284,6 +3286,8 @@ gw_get_header(struct gw_trans *gw_trans, struct gw_hea error = got_repo_match_object_id_prefix(&header->id, gw_trans->commit, GOT_OBJ_TYPE_COMMIT, header->repo); + if (error) + return error; } error = got_repo_map_path(&in_repo_path, header->repo,