diff --git a/src/transports/http.c b/src/transports/http.c index d5015f5af..7b77c925c 100644 --- a/src/transports/http.c +++ b/src/transports/http.c @@ -473,10 +473,7 @@ static int http_connect(git_transport *transport, int direction) giterr_set(GITERR_NET, "Invalid HTTP response"); return t->error = -1; } else { - /* Remove the comment and flush pkts */ - git_vector_remove(&transport->refs, 0); - git__free(pkt); - pkt = git_vector_get(&transport->refs, 0); + /* Remove the comment pkt from the list */ git_vector_remove(&transport->refs, 0); git__free(pkt); }