checkout, read-tree: fix leak of unpack_trees_options.dir
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
446cc5544a
commit
c512d27e78
@ -760,6 +760,10 @@ static int merge_working_tree(const struct checkout_opts *opts,
|
||||
init_tree_desc(&trees[1], tree->buffer, tree->size);
|
||||
|
||||
ret = unpack_trees(2, trees, &topts);
|
||||
if (topts.dir) {
|
||||
dir_clear(topts.dir);
|
||||
FREE_AND_NULL(topts.dir);
|
||||
}
|
||||
clear_unpack_trees_porcelain(&topts);
|
||||
if (ret == -1) {
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user