]> git.ipfire.org Git - thirdparty/git.git/commit - remote-curl.c
remote-curl.c: free memory in cmd_main()
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 4 Mar 2022 18:32:08 +0000 (19:32 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 4 Mar 2022 21:24:18 +0000 (13:24 -0800)
commitb07fa8f1b2004fa7ea7091ba453be894bddfeb3a
treeba7bd48d6b1f142c0279526c205eaea9fb5d9b3c
parenta41e8e74674d53a46616b01f2c18e43c7f2f30a8
remote-curl.c: free memory in cmd_main()

Plug a trivial memory leak in code added in a2d725b7bdf (Use an
external program to implement fetching with curl, 2009-08-05).

To do this have the cmd_main() use a "goto cleanup" pattern, and to
return an error of 1 unless we can fall through to the http_cleanup()
at the end.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote-curl.c