transport: fix leaks in refs_from_alternate_cb
commitdef0697167d0b3fb3c9cc1a2fcbac56e540aae48
authorJeff King <peff@peff.net>
Thu, 24 Jul 2014 04:41:30 +0000 (24 00:41 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 24 Jul 2014 20:57:50 +0000 (24 13:57 -0700)
tree67389fc3fc4d5e57cfd931ecd4ddabfebb82439c
parent28b3563241ac13733781fb0bada37f776a39f43d
transport: fix leaks in refs_from_alternate_cb

The function starts by creating a copy of the static buffer
returned by real_path, but forgets to free it in the error
code paths. We can solve this by jumping to the cleanup code
that is already there.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
transport.c