strarray: we should dispose instead of free

We _dispose_ the contents of objects; we _free_ objects (and their
contents).  Update `git_strarray_free` to be `git_strarray_dispose`.
`git_strarray_free` remains as a deprecated proxy function.
This commit is contained in:
Edward Thomson
2020-05-29 13:13:19 +01:00
parent a9746b306d
commit 51eff5a58b
27 changed files with 113 additions and 88 deletions

View File

@@ -239,7 +239,7 @@ next:
out:
git_reference_free(remote_ref);
git_strarray_free(&remotes);
git_strarray_dispose(&remotes);
return error;
}

View File

@@ -707,7 +707,7 @@ static void reference_listing(git_repository *repo)
git_reference_free(ref);
}
git_strarray_free(&ref_list);
git_strarray_dispose(&ref_list);
}
/**

View File

@@ -129,7 +129,7 @@ static int cmd_rename(git_repository *repo, struct remote_opts *o)
puts(problems.strings[0]);
}
git_strarray_free(&problems);
git_strarray_dispose(&problems);
return retval;
}
@@ -207,7 +207,7 @@ static int cmd_show(git_repository *repo, struct remote_opts *o)
git_remote_free(remote);
}
git_strarray_free(&remotes);
git_strarray_dispose(&remotes);
return 0;
}

View File

@@ -162,7 +162,7 @@ static void action_list_tags(tag_state *state)
each_tag(tag_names.strings[i], state);
}
git_strarray_free(&tag_names);
git_strarray_dispose(&tag_names);
}
static void action_delete_tag(tag_state *state)