commit - acd4ff87e51fe0de84244536dfae7f503c4635ae
commit + 4d0573ec49ba89483320bcbbbdf875ed936c16a6
blob - 55b30a337a5c628b4223bae7a3692a830ab1f1d2
blob + 079d6c4f0fa39bae6b6d665c9e4e75262b4ad0b8
--- 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)