diff options
Diffstat (limited to 'src/transports/smart.c')
-rw-r--r-- | src/transports/smart.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/transports/smart.c b/src/transports/smart.c index b6ee8d942..5ab51d068 100644 --- a/src/transports/smart.c +++ b/src/transports/smart.c @@ -128,8 +128,10 @@ static int git_smart__connect( /* If the only ref in the list is capabilities^{} with OID_ZERO, remove it */ if (1 == t->refs.length && !strcmp(first->head.name, "capabilities^{}") && - git_oid_iszero(&first->head.oid)) + git_oid_iszero(&first->head.oid)) { git_vector_clear(&t->refs); + git_pkt_free((git_pkt *)first); + } if (t->rpc && git_smart__reset_stream(t, false) < 0) return -1; |