Commit 7f1dd703 by Peter Pettersson

array: fix dereference from void * type

parent bcc0d750
......@@ -389,13 +389,13 @@ int git_diff_driver_lookup(
void git_diff_driver_free(git_diff_driver *driver)
{
size_t i;
git_diff_driver_pattern *pat;
if (!driver)
return;
for (i = 0; i < git_array_size(driver->fn_patterns); ++i)
git_regexp_dispose(& git_array_get(driver->fn_patterns, i)->re);
while ((pat = git_array_pop(driver->fn_patterns)) != NULL)
git_regexp_dispose(&pat->re);
git_array_clear(driver->fn_patterns);
git_regexp_dispose(&driver->word_pattern);
......
......@@ -1251,8 +1251,9 @@ int git_tree_create_updated(git_oid *out, git_repository *repo, git_tree *baseli
}
case GIT_TREE_UPDATE_REMOVE:
{
tree_stack_entry *last = git_array_last(stack);
char *basename = git_path_basename(update->path);
error = git_treebuilder_remove(git_array_last(stack)->bld, basename);
error = git_treebuilder_remove(last->bld, basename);
git__free(basename);
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment