]> git.ipfire.org Git - thirdparty/git.git/commit - remote.c
get_expanded_map(): avoid memory leak
authorMichael Haggerty <mhagger@alum.mit.edu>
Wed, 30 Oct 2013 05:32:57 +0000 (06:32 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 Oct 2013 21:16:34 +0000 (14:16 -0700)
commite31a17f7416a85ee8c3260f8c8b7519ff7ea82b6
treea0a9488c91f0d4c1c691cbefa920d9b323650d7d
parentf166db26af524278b42caac8f092d8de5e3e9c29
get_expanded_map(): avoid memory leak

The old code could leak *expn_name if match_name_with_pattern()
succeeded but ignore_symref_update() returned true.  So make sure that
*expn_name is freed in any case.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote.c