]> git.ipfire.org Git - thirdparty/git.git/commit
read_index_from(): avoid memory leak
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 15 Jun 2022 23:35:42 +0000 (23:35 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Jun 2022 20:22:03 +0000 (13:22 -0700)
commit652891de4ff164d545daa5472ab67f4f9d41319b
treee3fda800a7388b7a8022cc97b49bf041592fcb2c
parent41a86b64c093a6f36ffe0959aeed2e3f2590c7e8
read_index_from(): avoid memory leak

In 998330ac2e7c (read-cache: look for shared index files next to the
index, too, 2021-08-26), we added code that allocates memory to store
the base path of a shared index, but we never released that memory.

Reported by Coverity.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
read-cache.c