Re: [PATCH] update-index: fix xgetcwd() related memory leak

2017-03-29 Thread Jeff King
On Thu, Mar 30, 2017 at 08:22:08AM +0200, Christian Couder wrote: > As xgetcwd() returns an allocated buffer, we should free this > buffer when we don't need it any more. > > This was found by Coverity. > > Reported-by: Jeff King > Signed-off-by: Christian Couder > --- > builtin/update-index.

[PATCH] update-index: fix xgetcwd() related memory leak

2017-03-29 Thread Christian Couder
As xgetcwd() returns an allocated buffer, we should free this buffer when we don't need it any more. This was found by Coverity. Reported-by: Jeff King Signed-off-by: Christian Couder --- builtin/update-index.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/builtin/up