read-cache.c: free cache entry when refreshing fails
commitbc1c2caa7397e7e462f0cc7631a40f6e7cd480ab
authorStefan Beller <sbeller@google.com>
Tue, 17 Feb 2015 18:06:14 +0000 (17 10:06 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Feb 2015 18:42:43 +0000 (17 10:42 -0800)
tree8ab424539192646dad2e9cbe4b6db3cd77f7e11c
parent64a03e970ab3ef0ce45d6bd3c1de1bff1de2beee
read-cache.c: free cache entry when refreshing fails

This fixes a memory leak when building the cache entries as
refresh_cache_entry may decide to return NULL, but it does not
free the cache entry structure which was passed in as an argument.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
read-cache.c