X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Ffetch.c;h=93c99385a95e6ab525fa64c1dbb70d5d4ca103ba;hb=1b76df16d1e0f819af4e4766f7f621568571fd9f;hp=f9c41da475289b84fe849f7641406ebc94059630;hpb=0a2a5d889dcd0982de31e1d4faee3242854d7b9d;p=git.git diff --git a/builtin/fetch.c b/builtin/fetch.c index f9c41da47..93c99385a 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -875,6 +875,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv) { int i; static const char **refs = NULL; + struct refspec *refspec; int ref_nr = 0; 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); atexit(unlock_pack); - exit_code = do_fetch(transport, - parse_fetch_refspec(ref_nr, refs), ref_nr); + refspec = parse_fetch_refspec(ref_nr, refs); + exit_code = do_fetch(transport, refspec, ref_nr); + free(refspec); transport_disconnect(transport); transport = NULL; return exit_code;