From: Jeff King Date: Thu, 28 May 2015 07:54:43 +0000 (-0400) Subject: config.c: fix mmap leak when writing config X-Git-Tag: v2.4.5~7^2~3 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/3a1b3126ed5a0b51d5b1fdba827c92bf2acf5fc6?hp=3a1b3126ed5a0b51d5b1fdba827c92bf2acf5fc6 config.c: fix mmap leak when writing config We mmap the existing config file, but fail to unmap it if we hit an error. The function already has a shared exit path, so we can fix this by moving the mmap pointer to the function scope and clearing it in the shared exit. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano ---