mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
Merge branch 'maint'
* maint: fetch: do not leak a refspec
This commit is contained in:
commit
d64a09fe22
|
@ -875,6 +875,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
static const char **refs = NULL;
|
static const char **refs = NULL;
|
||||||
|
struct refspec *refspec;
|
||||||
int ref_nr = 0;
|
int ref_nr = 0;
|
||||||
int exit_code;
|
int exit_code;
|
||||||
|
|
||||||
|
@ -915,8 +916,9 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)
|
||||||
|
|
||||||
sigchain_push_common(unlock_pack_on_signal);
|
sigchain_push_common(unlock_pack_on_signal);
|
||||||
atexit(unlock_pack);
|
atexit(unlock_pack);
|
||||||
exit_code = do_fetch(transport,
|
refspec = parse_fetch_refspec(ref_nr, refs);
|
||||||
parse_fetch_refspec(ref_nr, refs), ref_nr);
|
exit_code = do_fetch(transport, refspec, ref_nr);
|
||||||
|
free(refspec);
|
||||||
transport_disconnect(transport);
|
transport_disconnect(transport);
|
||||||
transport = NULL;
|
transport = NULL;
|
||||||
return exit_code;
|
return exit_code;
|
||||||
|
|
Loading…
Reference in a new issue