Code

Merge branch 'maint-1.6.3' into maint
[git.git] / http.c
diff --git a/http.c b/http.c
index a2720d576d72e456b038444050f5b8de9d25d792..d60f7f7679459fe5e5ce64daf7152bd83535b632 100644 (file)
--- a/http.c
+++ b/http.c
@@ -719,7 +719,9 @@ void append_remote_object_url(struct strbuf *buf, const char *url,
                              const char *hex,
                              int only_two_digit_prefix)
 {
-       strbuf_addf(buf, "%s/objects/%.*s/", url, 2, hex);
+       end_url_with_slash(buf, url);
+
+       strbuf_addf(buf, "objects/%.*s/", 2, hex);
        if (!only_two_digit_prefix)
                strbuf_addf(buf, "%s", hex+2);
 }
@@ -1285,5 +1287,10 @@ void release_http_object_request(struct http_object_request *freq)
                free(freq->url);
                freq->url = NULL;
        }
-       freq->slot = NULL;
+       if (freq->slot != NULL) {
+               freq->slot->callback_func = NULL;
+               freq->slot->callback_data = NULL;
+               release_active_slot(freq->slot);
+               freq->slot = NULL;
+       }
 }