am: close stream on error, but not stdin
commitac8ce18d89acccaa7a66900adff75d4aeb6ec80b
authorRené Scharfe <l.s.r@web.de>
Sun, 16 Apr 2017 16:55:30 +0000 (16 18:55 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Apr 2017 04:27:39 +0000 (16 21:27 -0700)
tree258de46a4f032e808903a5d9c359f57514de1a38
parent49800c940790cc7465d1b03e08d472ffd8684808
am: close stream on error, but not stdin

Avoid closing stdin, but do close an actual input file on error exit.

Found with Cppcheck.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/am.c