Jeff King writes:
> I wondered if we might also leak when seeing duplicate config options
> (i.e., leaking the old one when replacing it with the new). But we don't
> actually strdup() the configured remote names, but instead just point
> into the "struct branch", which owns the data.
In additio
On Sat, Sep 21, 2013 at 09:09:23AM -0500, Felipe Contreras wrote:
> diff --git a/remote.c b/remote.c
> index efcba93..654e7f5 100644
> --- a/remote.c
> +++ b/remote.c
> @@ -480,7 +480,6 @@ static void read_config(void)
> int flag;
> if (default_remote_name) /* did this already */
>
There's no need to set the default remote name beforehand, only to be
overridden later on, and causing a memory leak, we can do it after the
configuration has been handled.
Signed-off-by: Felipe Contreras
---
remote.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/remote.c
3 matches
Mail list logo