checkout: fix resource leak

This commit is contained in:
Patrick Steinhardt 2016-02-09 11:07:50 +01:00
parent 39c9dd24d3
commit e262545753

View File

@ -1487,8 +1487,10 @@ static int blob_content_to_file(
if (!data->opts.disable_filters &&
(error = git_filter_list__load_ext(
&fl, data->repo, blob, hint_path,
GIT_FILTER_TO_WORKTREE, &filter_opts)))
GIT_FILTER_TO_WORKTREE, &filter_opts))) {
p_close(fd);
return error;
}
/* setup the writer */
memset(&writer, 0, sizeof(struct checkout_stream));