get_mail_commit_oid(): avoid resource leak
commit5b34ba414d105a8219e55babd0780a935a0c0c20
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 4 May 2017 13:55:45 +0000 (4 15:55 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 8 May 2017 03:18:19 +0000 (8 12:18 +0900)
treec79fef57bcaef2e07ea1a37a1f3fa2266d85d196
parent4db7dbdb4ae5426ab133b3844ea2a6889c6897d7
get_mail_commit_oid(): avoid resource leak

When we fail to read, or parse, the file, we still want to close the file
descriptor and release the strbuf.

Reported via Coverity.

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