diff options
| author | Patrick Steinhardt <ps@pks.im> | 2016-02-09 11:07:50 +0100 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2016-02-09 11:09:41 +0100 |
| commit | e26254575306abbc39acd96c6dc54a07aa3b2aa4 (patch) | |
| tree | c8f8e4b1b179fa97978d9aa9c873d4f40062f64d | |
| parent | 39c9dd24d3556bc4eec584ac2165f2a01de64da1 (diff) | |
| download | libgit2-e26254575306abbc39acd96c6dc54a07aa3b2aa4.tar.gz | |
checkout: fix resource leak
| -rw-r--r-- | src/checkout.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/checkout.c b/src/checkout.c index a92ad0825..fd8e2c443 100644 --- a/src/checkout.c +++ b/src/checkout.c @@ -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)); |
