Commit Diff


commit - e65c741086b97af5f2e89bfcd40fdad78ea62886
commit + f8eebdd4e657c910bdc7d7d8777256f59ddb6465
blob - 243023a16286773469f0f0226ff864ede9c04e6d
blob + 11a618f7f79a9dde03e5dd58c214491bdaf4d9a6
--- gotadmin/gotadmin.c
+++ gotadmin/gotadmin.c
@@ -644,6 +644,8 @@ cmd_pack(int argc, char *argv[])
 		goto done;
 	printf("\nIndexed %s.pack\n", id_str);
 done:
+	if (repo)
+		got_repo_close(repo);
 	got_pathlist_free(&exclude_args);
 	got_ref_list_free(&exclude_refs);
 	got_ref_list_free(&include_refs);
@@ -725,6 +727,8 @@ cmd_indexpack(int argc, char *argv[])
 		goto done;
 	printf("\nIndexed %s.pack\n", id_str);
 done:
+	if (repo)
+		got_repo_close(repo);
 	free(id_str);
 	free(pack_hash);
 	return error;
@@ -898,6 +902,8 @@ cmd_listpack(int argc, char *argv[])
 		    lpa.noffdeltas, lpa.nrefdeltas);
 	}
 done:
+	if (repo)
+		got_repo_close(repo);
 	free(id_str);
 	free(pack_hash);
 	free(packfile_path);