commit - bc95141ca7ce90e4b19a251b36c87601c150bb3f
commit + bce44e0b80af65d03bd0422e6468d7055e76b848
blob - 4beb308778696b4c4299304065d186d28b072d3e
blob + dcc24dae3dae23f69341a447788cdf594fc9a613
--- gotwebd/got_operations.c
+++ gotwebd/got_operations.c
struct got_commit_graph *graph = NULL;
struct got_commit_object *commit = NULL;
struct got_reflist_head refs;
- struct got_reference *ref;
+ struct got_reference *ref = NULL;
struct repo_commit *repo_commit = NULL;
struct server *srv = c->srv;
struct transport *t = c->t;
goto done;
error = got_ref_resolve(&id, repo, ref);
- got_ref_close(ref);
if (error)
goto done;
} else if (qs->commit != NULL) {
if (error)
goto done;
error = got_object_get_type(&obj_type, repo, id);
- got_ref_close(ref);
if (error)
goto done;
if (obj_type == GOT_OBJ_TYPE_TAG) {
}
done:
gotweb_free_repo_commit(repo_commit);
+ if (ref)
+ got_ref_close(ref);
if (commit)
got_object_commit_close(commit);
if (graph)