http-push: clear refspecs before exiting

We parse the command-line arguments into a refspec struct, but we never
free them. We should do so before exiting to avoid triggering the
leak-checker.

This triggers in t5540 many times (basically every invocation of
http-push).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2024-09-24 18:04:30 -04:00
committed by Junio C Hamano
parent 134bfedf6d
commit 85430af347

View File

@ -1983,5 +1983,7 @@ int cmd_main(int argc, const char **argv)
request = next_request;
}
refspec_clear(&rs);
return rc;
}