mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
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:
@@ -239,7 +239,7 @@ next:
|
||||
|
||||
out:
|
||||
git_reference_free(remote_ref);
|
||||
git_strarray_free(&remotes);
|
||||
git_strarray_dispose(&remotes);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user