open_istream(): do not dereference NULL in the error case
commit78368f2c1ad342719ccf1e719bd5126ca6c7b68b
authorJunio C Hamano <gitster@pobox.com>
Wed, 19 Feb 2014 00:00:53 +0000 (18 16:00 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 19 Feb 2014 00:00:53 +0000 (18 16:00 -0800)
tree7fbeaf3abefa9c7ecf66770309c5617b8f146667
parentd954828d45efbd4b53576e86066657e87391318d
open_istream(): do not dereference NULL in the error case

When stream-filter cannot be attached, it is expected to return NULL,
and we should close the stream we opened and signal an error by
returning NULL ourselves from this function.

However, we attempted to dereference that NULL pointer between the
point we detected the error and returned from the function.

Brought-to-attention-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
streaming.c