builtin/send-pack: fix leaking refspecs

We never free data associated with the assembled refspec in
git-send-pack(1), causing a memory leak. Fix this.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2024-08-22 11:17:46 +02:00
committed by Junio C Hamano
parent ca52234183
commit a09efb74e3
6 changed files with 9 additions and 0 deletions

View File

@ -338,5 +338,6 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
free_refs(remote_refs);
free_refs(local_refs);
refspec_clear(&rs);
return ret;
}