Commit Diff


commit - dd3af45a9cdaa4f41ab7ad2211482048d275044a
commit + c75a6067f1f36c6bbebd9f3737672055674df806
blob - a06dcd6e6e5d5d4b30b9fc207ed46528af8ca290
blob + 044fa1b21895a175e76d5e6c235ab0edce4761b8
--- gotadmin/gotadmin.c
+++ gotadmin/gotadmin.c
@@ -643,6 +643,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);
@@ -724,6 +726,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;
@@ -897,6 +901,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);