config.c: fix mmap leak when writing config
authorJeff King <peff@peff.net>
Thu, 28 May 2015 07:54:43 +0000 (03:54 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 May 2015 18:32:04 +0000 (11:32 -0700)
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found