Re: [PATCH v2 23/25] name-rev: avoid leaking memory in the `deref` case

2017-05-03 Thread Junio C Hamano
Johannes Schindelin writes: > Hi Junio, > > On Mon, 1 May 2017, Junio C Hamano wrote: > >> Junio C Hamano writes: >> >> > Johannes Schindelin writes: >> > >> >> diff --git a/builtin/name-rev.c b/builtin/name-rev.c >>

Re: [PATCH v2 23/25] name-rev: avoid leaking memory in the `deref` case

2017-05-02 Thread Johannes Schindelin
Hi Junio, On Mon, 1 May 2017, Junio C Hamano wrote: > Junio C Hamano writes: > > > Johannes Schindelin writes: > > > >> diff --git a/builtin/name-rev.c b/builtin/name-rev.c > >> index 92a5d8a5d26..a4ce73fb1e9 100644 > >> --- a/builtin/name-rev.c

Re: [PATCH v2 23/25] name-rev: avoid leaking memory in the `deref` case

2017-05-01 Thread Junio C Hamano
Junio C Hamano writes: > Johannes Schindelin writes: > >> When the `name_rev()` function is asked to dereference the tip name, it >> allocates memory. But when it turns out that another tip already >> described the commit better than the current

Re: [PATCH v2 23/25] name-rev: avoid leaking memory in the `deref` case

2017-05-01 Thread Junio C Hamano
Johannes Schindelin writes: > When the `name_rev()` function is asked to dereference the tip name, it > allocates memory. But when it turns out that another tip already > described the commit better than the current one, we forgot to release > the memory. Very well

[PATCH v2 23/25] name-rev: avoid leaking memory in the `deref` case

2017-04-28 Thread Johannes Schindelin
When the `name_rev()` function is asked to dereference the tip name, it allocates memory. But when it turns out that another tip already described the commit better than the current one, we forgot to release the memory. Pointed out by Coverity. Signed-off-by: Johannes Schindelin