Re: [PATCH 3/3] submodule--helper: plug mem leak in print_default_remote
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- May 31, 2018, 12:07 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1805311407140.82@tvgsbejvaqbjf.bet>
- In-Reply-To
- <20180530170302.191176-3-sbeller@google.com>
Hi Stefan,
On Wed, 30 May 2018, Stefan Beller wrote:
Show 14 quoted lines
> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---
> builtin/submodule--helper.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
> index 7c3cd9dbeba..96024fee1b1 100644
> --- a/builtin/submodule--helper.c
> +++ b/builtin/submodule--helper.c
> @@ -63,6 +63,7 @@ static int print_default_remote(int argc, const char **argv, const char *prefix)
> if (remote)
> printf("%s\n", remote);
>
> + free(remote);Makes sense.
Out of curiosity (and because a cover letter is missing): how did you stumble over these? Coverity?
Ciao, Dscho
Show 7 quoted lines
> return 0; > } > > -- > 2.17.1.1185.g55be947832-goog > >