Ævar Arnfjörð Bjarmason
486620ae0c
name-rev: don't xstrdup() an already dup'd string
...
When "add_to_tip_table()" is called with a non-zero
"shorten_unambiguous" we always return an xstrdup()'d string, which
we'd then xstrdup() again, leaking memory. See [1] and [2] for how
this leak came about.
We could xstrdup() only if "shorten_unambiguous" wasn't true, but
let's instead inline this code, so that information on whether we need
to xstrdup() is contained within add_to_tip_table().
1. 98c5c4ad01 (name-rev: allow to specify a subpath for --refs
option, 2013-06-18)
2. b23e0b9353 (name-rev: allow converting the exact object name at
the tip of a ref, 2013-07-07)
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com >
Signed-off-by: Junio C Hamano <gitster@pobox.com >
2023-02-06 15:34:37 -08:00
..
2022-12-26 11:42:05 +09:00
2023-01-21 17:21:58 -08:00
2022-08-19 11:13:14 -07:00
2023-01-13 14:17:14 -08:00
2022-10-13 09:32:57 -07:00
2022-12-19 11:46:18 +09:00
2022-11-21 12:32:48 +09:00
2023-01-05 15:07:22 +09:00
2023-01-05 15:07:17 +09:00
2023-01-14 08:49:55 -08:00
2022-11-21 12:06:15 +09:00
2022-07-01 11:43:42 -07:00
2022-11-21 12:06:15 +09:00
2023-01-08 10:28:34 +09:00
2023-02-06 15:34:37 -08:00
2023-02-06 15:34:37 -08:00
2023-02-06 15:34:36 -08:00
2022-10-13 09:32:57 -07:00
2022-12-14 15:55:46 +09:00
2022-11-21 12:32:48 +09:00
2022-10-13 09:32:57 -07:00
2022-11-21 12:06:15 +09:00
2022-10-28 11:26:54 -07:00
2022-11-21 12:06:15 +09:00
2022-11-21 12:06:15 +09:00
2022-11-21 12:06:15 +09:00
2022-12-14 15:55:46 +09:00
2023-01-17 14:32:06 -08:00
2022-12-13 22:16:23 +09:00
2022-09-01 10:49:48 -07:00
2022-09-12 08:38:59 -07:00
2023-01-19 14:41:48 -08:00
2022-11-14 22:39:25 -05:00
2022-11-21 12:06:15 +09:00
2022-12-19 11:46:17 +09:00
2022-11-23 11:22:24 +09:00
2022-11-21 12:06:14 +09:00
2023-01-27 08:51:41 -08:00
2022-10-28 11:26:54 -07:00
2022-08-19 11:13:15 -07:00
2022-06-17 10:38:26 -07:00
2022-10-13 09:32:57 -07:00
2022-10-13 09:32:57 -07:00
2023-01-23 13:39:52 -08:00
2022-11-21 12:32:48 +09:00
2022-10-13 09:32:56 -07:00
2023-01-23 13:39:50 -08:00
2022-05-20 15:26:59 -07:00
2022-10-13 09:32:56 -07:00
2022-07-01 11:43:43 -07:00
2022-11-21 12:06:15 +09:00
2022-11-21 12:06:15 +09:00
2022-12-26 11:42:05 +09:00
2023-01-13 10:24:57 -08:00
2022-06-21 10:12:15 -07:00
2022-10-06 09:56:51 -07:00
2022-11-21 12:06:15 +09:00
2023-02-06 15:34:37 -08:00
2022-11-16 14:57:32 -05:00
2023-01-14 08:49:55 -08:00
2022-10-13 09:32:56 -07:00
2022-10-13 09:32:56 -07:00
2022-10-24 15:44:20 -07:00
2022-11-21 15:58:54 +09:00
2022-11-21 12:06:15 +09:00
2022-11-14 16:55:50 -05:00
2022-12-02 08:25:29 +09:00
2022-12-26 10:21:44 +09:00
2023-01-13 12:23:14 -08:00
2022-11-17 16:22:52 -05:00
2022-09-19 11:11:11 -07:00
2023-01-08 10:34:37 +09:00
2023-01-08 10:34:35 +09:00
2022-11-08 17:15:12 -05:00
2022-12-14 15:55:46 +09:00
2022-08-05 14:13:12 -07:00
2022-12-13 22:16:23 +09:00
2023-02-06 15:34:37 -08:00
2022-11-23 11:22:25 +09:00
2022-12-14 15:55:46 +09:00
2022-12-14 15:55:46 +09:00
2022-12-26 10:21:43 +09:00
2022-10-13 09:32:56 -07:00
2022-10-24 14:48:05 -07:00
2022-10-28 11:26:54 -07:00
2022-10-28 11:26:54 -07:00
2023-01-17 14:32:06 -08:00
2023-02-06 15:34:37 -08:00
2023-01-08 10:28:34 +09:00
2022-10-28 11:26:54 -07:00
2022-10-13 09:32:56 -07:00
2022-11-21 12:32:48 +09:00
2022-06-13 10:22:36 -07:00
2022-11-21 12:06:15 +09:00
2022-10-13 09:32:56 -07:00
2022-10-13 09:32:56 -07:00
2022-10-13 09:32:56 -07:00
2022-12-18 11:48:26 +09:00
2022-10-13 09:32:56 -07:00
2022-10-13 09:32:56 -07:00
2022-10-13 09:32:56 -07:00
2023-01-17 14:32:06 -08:00