author | Junio C Hamano <gitster@pobox.com> | |
Mon, 17 Nov 2008 15:54:07 +0000 (07:54 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 17 Nov 2008 15:54:07 +0000 (07:54 -0800) | ||
commit | 83b767360a183abf29cb0cc0fd647fb683cff616 | |
tree | 6efa1793ee0cf810b44a6c3d826070d61f60cda0 | tree | snapshot |
parent | 357af14fc491748c874cd8791a5bcf5e1a426ee8 | commit | diff |
builtin-remote.c: plug a small memory leak in get_one_remote_for_updates()
We know that the string pointed at by remote->name won't change. It can
be borrowed as the key in the string_list without copying. Other parts of
existing code such as get_one_entry() already rely on this fact.
Noticed by Cheng Renquan.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
We know that the string pointed at by remote->name won't change. It can
be borrowed as the key in the string_list without copying. Other parts of
existing code such as get_one_entry() already rely on this fact.
Noticed by Cheng Renquan.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-remote.c | diff | blob | history |