Keith McGuigan writes:
> As an alternative, I could xstrdup each instance where remote->name is
> appended,
> which would make the string_list a homogenous dup'd list, which we
> could then free.
Yeah, I think that is the right way to fix it, even though I agree
with you that a small leak you i
On Mon, Jun 13, 2016 at 08:14:43PM -0400, Keith McGuigan wrote:
> Right. The string_list ends up getting (potentially) populated with a
> mix of dup'd and borrowed values. I figured it was safer to leak here
> (especially as we're on the way out anyway), than free memory that
> shouldn't be free
Right. The string_list ends up getting (potentially) populated with a
mix of dup'd
and borrowed values. I figured it was safer to leak here (especially
as we're on
the way out anyway), than free memory that shouldn't be freed.
Actually, what motivates this (and I apologize that I didn't say this
kmcgui...@twopensource.com writes:
> From: Keith McGuigan
>
> The string_list gets populated with the names from the remotes[] array,
> which are not dup'd and the list does not own.
>
> Signed-of-by: Keith McGuigan
> ---
For names that come from remote_get()->name, e.g.
static int get_one
From: Keith McGuigan
The string_list gets populated with the names from the remotes[] array,
which are not dup'd and the list does not own.
Signed-of-by: Keith McGuigan
---
builtin/fetch.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 630ae6a1bb78
5 matches
Mail list logo