Diff options
Diffstat (limited to 'source')
-rw-r--r--source/ui-clone.c10
1 file changed, 4 insertions, 6 deletions
diff --git a/source/ui-clone.c b/source/ui-clone.c
index 8f3439e..bdfbdf7 100644
--- a/source/ui-clone.c
+++ b/source/ui-clone.c
@@ -156,8 +156,10 @@ void cgit_clone_objects(void)
{
char *path;
- if (!ctx.qry.path)
- goto err;
+ if (!ctx.qry.path) {
+ cgit_print_error_page(400, "Bad Request", "Bad request");
+ return;
+ }
if (!strcmp(ctx.qry.path, "info/packs")) {
print_pack_info();
@@ -172,10 +174,6 @@ void cgit_clone_objects(void)
path = repo_git_path(the_repository, "objects/%s", ctx.qry.path);
send_file(path);
free(path);
- return;
-
-err:
- cgit_print_error_page(400, "Bad Request", "Bad request");
}
/*