commit - d639f28bed6c07bf171d552905c55829117715da
commit + 21c2d8be42605670e7037d011fea06c5efd5f725
blob - 3e6b04e4af30b1ecf1c809f6bbb9ec651bc524f2
blob + 373ce90b8c88da56713540961da644b3b28c4984
--- got/got.c
+++ got/got.c
if (error == NULL)
error = close_err;
}
- TAILQ_FOREACH(pe, &refs, entry) {
- free((void *)pe->path);
- free(pe->data);
- }
- got_pathlist_free(&refs);
- TAILQ_FOREACH(pe, &symrefs, entry) {
- free((void *)pe->path);
- free(pe->data);
- }
- got_pathlist_free(&symrefs);
- got_pathlist_free(&wanted_branches);
- got_pathlist_free(&wanted_refs);
+ got_pathlist_free(&refs, GOT_PATHLIST_FREE_ALL);
+ got_pathlist_free(&symrefs, GOT_PATHLIST_FREE_ALL);
+ got_pathlist_free(&wanted_branches, GOT_PATHLIST_FREE_NONE);
+ got_pathlist_free(&wanted_refs, GOT_PATHLIST_FREE_NONE);
free(pack_hash);
free(proto);
free(host);
if (error == NULL)
error = pack_err;
}
- TAILQ_FOREACH(pe, &refs, entry) {
- free((void *)pe->path);
- free(pe->data);
- }
- got_pathlist_free(&refs);
- TAILQ_FOREACH(pe, &symrefs, entry) {
- free((void *)pe->path);
- free(pe->data);
- }
- got_pathlist_free(&symrefs);
- got_pathlist_free(&wanted_branches);
- got_pathlist_free(&wanted_refs);
+ got_pathlist_free(&refs, GOT_PATHLIST_FREE_ALL);
+ got_pathlist_free(&symrefs, GOT_PATHLIST_FREE_ALL);
+ got_pathlist_free(&wanted_branches, GOT_PATHLIST_FREE_NONE);
+ got_pathlist_free(&wanted_refs, GOT_PATHLIST_FREE_NONE);
free(id_str);
free(cwd);
free(repo_path);
got_ref_close(head_ref);
if (ref)
got_ref_close(ref);
- got_pathlist_free(&paths);
+ got_pathlist_free(&paths, GOT_PATHLIST_FREE_NONE);
free(commit_id_str);
free(commit_id);
free(repo_path);
error = pack_err;
}
free(worktree_path);
- TAILQ_FOREACH(pe, &paths, entry)
- free((char *)pe->path);
- got_pathlist_free(&paths);
+ got_pathlist_free(&paths, GOT_PATHLIST_FREE_PATH);
free(commit_id);
free(commit_id_str);
return error;
struct got_object_qid *qid;
struct got_commit_object *commit;
struct got_pathlist_head changed_paths;
- struct got_pathlist_entry *pe;
STAILQ_INIT(&reversed_commits);
TAILQ_INIT(&changed_paths);
}
if (have_match == 0) {
got_object_commit_close(commit);
- TAILQ_FOREACH(pe, &changed_paths, entry) {
- free((char *)pe->path);
- free(pe->data);
- }
- got_pathlist_free(&changed_paths);
+ got_pathlist_free(&changed_paths,
+ GOT_PATHLIST_FREE_ALL);
continue;
}
}
(end_id && got_object_id_cmp(&id, end_id) == 0))
break;
- TAILQ_FOREACH(pe, &changed_paths, entry) {
- free((char *)pe->path);
- free(pe->data);
- }
- got_pathlist_free(&changed_paths);
+ got_pathlist_free(&changed_paths, GOT_PATHLIST_FREE_ALL);
}
if (reverse_display_order) {
STAILQ_FOREACH(qid, &reversed_commits, entry) {
got_object_commit_close(commit);
if (err)
break;
- TAILQ_FOREACH(pe, &changed_paths, entry) {
- free((char *)pe->path);
- free(pe->data);
- }
- got_pathlist_free(&changed_paths);
+ got_pathlist_free(&changed_paths, GOT_PATHLIST_FREE_ALL);
}
}
done:
STAILQ_REMOVE_HEAD(&reversed_commits, entry);
got_object_qid_free(qid);
}
- TAILQ_FOREACH(pe, &changed_paths, entry) {
- free((char *)pe->path);
- free(pe->data);
- }
- got_pathlist_free(&changed_paths);
+ got_pathlist_free(&changed_paths, GOT_PATHLIST_FREE_ALL);
if (search_pattern)
regfree(®ex);
got_commit_graph_close(graph);
const char *errstr;
struct got_reflist_head refs;
struct got_pathlist_head diffstat_paths, paths;
- struct got_pathlist_entry *pe;
FILE *f1 = NULL, *f2 = NULL, *outfile = NULL;
int fd1 = -1, fd2 = -1;
int *pack_fds = NULL;
if (error == NULL)
error = pack_err;
}
- TAILQ_FOREACH(pe, &paths, entry)
- free((char *)pe->path);
- got_pathlist_free(&paths);
- TAILQ_FOREACH(pe, &diffstat_paths, entry) {
- free((char *)pe->path);
- free(pe->data);
- }
- got_pathlist_free(&diffstat_paths);
+ got_pathlist_free(&paths, GOT_PATHLIST_FREE_PATH);
+ got_pathlist_free(&diffstat_paths, GOT_PATHLIST_FREE_ALL);
got_ref_list_free(&refs);
if (outfile && fclose(outfile) == EOF && error == NULL)
error = got_error_from_errno("fclose");
struct got_status_arg st;
char *cwd = NULL;
struct got_pathlist_head paths;
- struct got_pathlist_entry *pe;
int ch, i, no_ignores = 0;
int *pack_fds = NULL;
error = pack_err;
}
- TAILQ_FOREACH(pe, &paths, entry)
- free((char *)pe->path);
- got_pathlist_free(&paths);
+ got_pathlist_free(&paths, GOT_PATHLIST_FREE_PATH);
free(cwd);
return error;
}
const char *delref = NULL, *commit_id_arg = NULL;
struct got_reference *ref = NULL;
struct got_pathlist_head paths;
- struct got_pathlist_entry *pe;
struct got_object_id *commit_id = NULL;
char *commit_id_str = NULL;
int *pack_fds = NULL;
free(repo_path);
free(commit_id);
free(commit_id_str);
- TAILQ_FOREACH(pe, &paths, entry)
- free((char *)pe->path);
- got_pathlist_free(&paths);
+ got_pathlist_free(&paths, GOT_PATHLIST_FREE_PATH);
return error;
}
if (error == NULL)
error = pack_err;
}
- TAILQ_FOREACH(pe, &paths, entry)
- free((char *)pe->path);
- got_pathlist_free(&paths);
+ got_pathlist_free(&paths, GOT_PATHLIST_FREE_PATH);
free(cwd);
return error;
}
if (error == NULL)
error = pack_err;
}
- TAILQ_FOREACH(pe, &paths, entry)
- free((char *)pe->path);
- got_pathlist_free(&paths);
+ got_pathlist_free(&paths, GOT_PATHLIST_FREE_PATH);
free(cwd);
return error;
}
}
if (ref)
got_ref_close(ref);
- got_pathlist_free(&branches);
- got_pathlist_free(&tags);
+ got_pathlist_free(&branches, GOT_PATHLIST_FREE_NONE);
+ got_pathlist_free(&tags, GOT_PATHLIST_FREE_NONE);
got_ref_list_free(&all_branches);
got_ref_list_free(&all_tags);
- got_pathlist_free(&delete_args);
- TAILQ_FOREACH(pe, &delete_branches, entry)
- free((char *)pe->path);
- got_pathlist_free(&delete_branches);
+ got_pathlist_free(&delete_args, GOT_PATHLIST_FREE_NONE);
+ got_pathlist_free(&delete_branches, GOT_PATHLIST_FREE_PATH);
free(cwd);
free(repo_path);
free(proto);
error = got_worktree_checkout_files(worktree,
&paths, repo, update_progress, &upa,
check_cancelled, NULL);
- got_pathlist_free(&paths);
+ got_pathlist_free(&paths, GOT_PATHLIST_FREE_NONE);
if (error)
goto done;
if (upa.did_something) {
if (error)
goto done;
}
- got_worktree_rebase_pathlist_free(&merged_paths);
+ got_pathlist_free(&merged_paths, GOT_PATHLIST_FREE_PATH);
break;
}
error = rebase_commit(&merged_paths, worktree, fileindex,
tmp_branch, committer, commit_id, repo);
- got_worktree_rebase_pathlist_free(&merged_paths);
+ got_pathlist_free(&merged_paths, GOT_PATHLIST_FREE_PATH);
if (error)
goto done;
}
error = got_worktree_status(worktree, &paths,
repo, 0, check_local_changes, &have_changes,
check_cancelled, NULL);
- got_pathlist_free(&paths);
+ got_pathlist_free(&paths,
+ GOT_PATHLIST_FREE_NONE);
if (error) {
if (error->code != GOT_ERR_CANCELLED)
goto done;
if (error)
goto done;
}
- got_worktree_rebase_pathlist_free(&merged_paths);
+ got_pathlist_free(&merged_paths, GOT_PATHLIST_FREE_PATH);
break;
}
printf("Stopping histedit for amending commit %s\n",
id_str);
free(id_str);
- got_worktree_rebase_pathlist_free(&merged_paths);
+ got_pathlist_free(&merged_paths, GOT_PATHLIST_FREE_PATH);
error = got_worktree_histedit_postpone(worktree,
fileindex);
goto done;
error = histedit_commit(&merged_paths, worktree, fileindex,
tmp_branch, hle, committer, repo);
- got_worktree_rebase_pathlist_free(&merged_paths);
+ got_pathlist_free(&merged_paths, GOT_PATHLIST_FREE_PATH);
if (error)
goto done;
}
struct got_worktree *worktree = NULL;
char *cwd = NULL;
struct got_pathlist_head paths;
- struct got_pathlist_entry *pe;
int ch, list_stage = 0, pflag = 0, allow_bad_symlinks = 0;
FILE *patch_script_file = NULL;
const char *patch_script_path = NULL;
if (error == NULL)
error = pack_err;
}
- TAILQ_FOREACH(pe, &paths, entry)
- free((char *)pe->path);
- got_pathlist_free(&paths);
+ got_pathlist_free(&paths, GOT_PATHLIST_FREE_PATH);
free(cwd);
return error;
}
struct got_worktree *worktree = NULL;
char *cwd = NULL;
struct got_pathlist_head paths;
- struct got_pathlist_entry *pe;
int ch, pflag = 0;
struct got_update_progress_arg upa;
FILE *patch_script_file = NULL;
if (error == NULL)
error = pack_err;
}
- TAILQ_FOREACH(pe, &paths, entry)
- free((char *)pe->path);
- got_pathlist_free(&paths);
+ got_pathlist_free(&paths, GOT_PATHLIST_FREE_PATH);
free(cwd);
return error;
}
struct got_worktree *worktree = NULL;
char *cwd = NULL, *id_str = NULL;
struct got_pathlist_head paths;
- struct got_pathlist_entry *pe;
char *uuidstr = NULL;
int ch, show_files = 0;
done:
if (worktree)
got_worktree_close(worktree);
- TAILQ_FOREACH(pe, &paths, entry)
- free((char *)pe->path);
- got_pathlist_free(&paths);
+ got_pathlist_free(&paths, GOT_PATHLIST_FREE_PATH);
free(cwd);
free(id_str);
free(uuidstr);
blob - c8bff38153e5c402844c563465693064b7257d24
blob + e56af526574e829f6648d2978d85ee8b14af9cd2
--- gotadmin/gotadmin.c
+++ gotadmin/gotadmin.c
if (error == NULL)
error = pack_err;
}
- got_pathlist_free(&exclude_args);
+ got_pathlist_free(&exclude_args, GOT_PATHLIST_FREE_NONE);
got_ref_list_free(&exclude_refs);
got_ref_list_free(&include_refs);
free(id_str);
blob - 7cb114b362ef4f4a6d3f385fb37066d5a97691bd
blob + aa121bb3af4c0cba66fb0d062f2f6a8cc33fdd27
--- include/got_path.h
+++ include/got_path.h
const struct got_error *got_pathlist_append(struct got_pathlist_head *,
const char *, void *);
+/* Flags passed to got_pathlist_free() to control which pointers are freed. */
+#define GOT_PATHLIST_FREE_NONE 0 /* pathlist entry only */
+#define GOT_PATHLIST_FREE_PATH (1 << 0) /* entry and path pointer */
+#define GOT_PATHLIST_FREE_DATA (1 << 1) /* entry and data pointer */
+#define GOT_PATHLIST_FREE_ALL (GOT_PATHLIST_FREE_PATH|GOT_PATHLIST_FREE_DATA)
+
/* Free resources allocated for a path list. */
-void got_pathlist_free(struct got_pathlist_head *);
+void got_pathlist_free(struct got_pathlist_head *, int);
/* Attempt to create a directory at a given path. */
const struct got_error *got_path_mkdir(const char *);
blob - 3d11d1ed4657d8fa1f4809c2b04fe5b891fea563
blob + d3c26b9a044948f5b93e8f2f6adf673b8dd7e599
--- include/got_worktree.h
+++ include/got_worktree.h
* progress callback. Also populate a list of affected paths which should
* be passed to got_worktree_rebase_commit() after a conflict-free merge.
* This list must be initialized with TAILQ_INIT() and disposed of with
- * got_worktree_rebase_pathlist_free().
+ * got_pathlist_free(list, GOT_PATHLIST_FREE_PATH).
*/
const struct got_error *got_worktree_rebase_merge_files(
struct got_pathlist_head *, struct got_worktree *, struct got_fileindex *,
struct got_reference *, const char *, struct got_commit_object *,
struct got_object_id *, struct got_repository *);
-/* Free a list of merged paths from got_worktree_merge_files. */
-void got_worktree_rebase_pathlist_free(struct got_pathlist_head *);
-
/* Postpone the rebase operation. Should be called after a merge conflict. */
const struct got_error *got_worktree_rebase_postpone(struct got_worktree *,
struct got_fileindex *);
* progress callback. Also populate a list of affected paths which should
* be passed to got_worktree_histedit_commit() after a conflict-free merge.
* This list must be initialized with TAILQ_INIT() and disposed of with
- * got_worktree_rebase_pathlist_free().
+ * got_pathlist_free(list, GOT_PATHLIST_FREE_PATH).
*/
const struct got_error *got_worktree_histedit_merge_files(
struct got_pathlist_head *, struct got_worktree *, struct got_fileindex *,
blob - fa7413ae8411122c7687d51f8121007fc1d7dc5c
blob + 2c31b3baf9ef7b0f28c232487805460cb4fa1a6a
--- lib/fetch.c
+++ lib/fetch.c
free(packpath);
free(progress);
- TAILQ_FOREACH(pe, &have_refs, entry) {
- free((char *)pe->path);
- free(pe->data);
- }
- got_pathlist_free(&have_refs);
+ got_pathlist_free(&have_refs, GOT_PATHLIST_FREE_ALL);
got_ref_list_free(&my_refs);
if (err) {
free(*pack_hash);
*pack_hash = NULL;
- TAILQ_FOREACH(pe, refs, entry) {
- free((void *)pe->path);
- free(pe->data);
- }
- got_pathlist_free(refs);
- TAILQ_FOREACH(pe, symrefs, entry) {
- free((void *)pe->path);
- free(pe->data);
- }
- got_pathlist_free(symrefs);
+ got_pathlist_free(refs, GOT_PATHLIST_FREE_ALL);
+ got_pathlist_free(symrefs, GOT_PATHLIST_FREE_ALL);
}
return err;
}
blob - 483771419c2b844e139052425b5c7089f73bb68a
blob + d2a03e1d84e482a3a77be76620b440f9c795ff85
--- lib/fileindex.c
+++ lib/fileindex.c
return err;
}
-static void
-free_dirlist(struct got_pathlist_head *dirlist)
-{
- struct got_pathlist_entry *dle;
-
- TAILQ_FOREACH(dle, dirlist, entry)
- free(dle->data);
- got_pathlist_free(dirlist);
-}
-
static int
have_tracked_file_in_dir(struct got_fileindex *fileindex, const char *path)
{
err = got_error_from_errno2("closedir", subdirpath);
free(subpath);
free(subdirpath);
- free_dirlist(&subdirlist);
+ got_pathlist_free(&subdirlist, GOT_PATHLIST_FREE_DATA);
if (err)
return err;
}
if (closedir(dir) == -1 && err == NULL)
err = got_error_from_errno2("closedir", path);
- free_dirlist(&dirlist);
+ got_pathlist_free(&dirlist, GOT_PATHLIST_FREE_DATA);
return err;
}
blob - fa3fd1272850220a7010ecf116f1b8f2fdee73b1
blob + 2d6982b9e7830aab3274aa68aa2ade900ffc82d2
--- lib/path.c
+++ lib/path.c
}
void
-got_pathlist_free(struct got_pathlist_head *pathlist)
+got_pathlist_free(struct got_pathlist_head *pathlist, int freemask)
{
struct got_pathlist_entry *pe;
while ((pe = TAILQ_FIRST(pathlist)) != NULL) {
+ if (freemask & GOT_PATHLIST_FREE_PATH) {
+ free((char *)pe->path);
+ pe->path = NULL;
+ }
+ if (freemask & GOT_PATHLIST_FREE_DATA) {
+ free(pe->data);
+ pe->data = NULL;
+ }
TAILQ_REMOVE(pathlist, pe, entry);
free(pe);
}
blob - 6f22a459dcf584569cb37bce03612894b30cf971
blob + b0c3b7094e4b1c970d1cda630bbf40c4862d3c6f
--- lib/repository.c
+++ lib/repository.c
{
const struct got_error *err = NULL, *child_err;
struct got_packidx_bloom_filter *bf;
- struct got_pathlist_entry *pe;
size_t i;
for (i = 0; i < repo->pack_cache_size; i++) {
free(repo->extensions[i]);
free(repo->extensions);
- TAILQ_FOREACH(pe, &repo->packidx_paths, entry)
- free((void *)pe->path);
- got_pathlist_free(&repo->packidx_paths);
+ got_pathlist_free(&repo->packidx_paths, GOT_PATHLIST_FREE_PATH);
free(repo);
return err;
done:
if (dir)
closedir(dir);
- got_pathlist_free(&paths);
+ got_pathlist_free(&paths, GOT_PATHLIST_FREE_NONE);
return err;
}
blob - edb3e20183d33860e39b8ec07038fcae745ceb0f
blob + be435b3948bb0c087620071008e5aaef90565f6b
--- lib/send.c
+++ lib/send.c
err = got_error_from_errno("close");
got_ref_list_free(&refs);
- got_pathlist_free(&have_refs);
- got_pathlist_free(&their_refs);
+ got_pathlist_free(&have_refs, GOT_PATHLIST_FREE_NONE);
+ got_pathlist_free(&their_refs, GOT_PATHLIST_FREE_NONE);
for (i = 0; i < nours; i++)
free(our_ids[i]);
free(our_ids);
blob - d535cf87d5de06518314b223a8def80c07ea403b
blob + f4f5fcfcdf51986e308f977d52be4490277e5019
--- lib/worktree.c
+++ lib/worktree.c
}
static void
-free_ignorelist(struct got_pathlist_head *ignorelist)
-{
- struct got_pathlist_entry *pe;
-
- TAILQ_FOREACH(pe, ignorelist, entry)
- free((char *)pe->path);
- got_pathlist_free(ignorelist);
-}
-
-static void
free_ignores(struct got_pathlist_head *ignores)
{
struct got_pathlist_entry *pe;
TAILQ_FOREACH(pe, ignores, entry) {
struct got_pathlist_head *ignorelist = pe->data;
- free_ignorelist(ignorelist);
- free((char *)pe->path);
+
+ got_pathlist_free(ignorelist, GOT_PATHLIST_FREE_PATH);
}
- got_pathlist_free(ignores);
+ got_pathlist_free(ignores, GOT_PATHLIST_FREE_PATH);
}
static const struct got_error *
free(line);
if (err || pe == NULL) {
free(dirpath);
- free_ignorelist(ignorelist);
+ got_pathlist_free(ignorelist, GOT_PATHLIST_FREE_PATH);
}
return err;
}
/* Write new list of entries; deleted entries have been dropped. */
err = got_object_tree_create(new_tree_id, &paths, *nentries, repo);
done:
- got_pathlist_free(&paths);
+ got_pathlist_free(&paths, GOT_PATHLIST_FREE_NONE);
return err;
}
err = unlockerr;
TAILQ_FOREACH(pe, &commitable_paths, entry) {
struct got_commitable *ct = pe->data;
+
free_commitable(ct);
}
- got_pathlist_free(&commitable_paths);
+ got_pathlist_free(&commitable_paths, GOT_PATHLIST_FREE_NONE);
if (diff_path && unlink(diff_path) == -1 && err == NULL)
err = got_error_from_errno2("unlink", diff_path);
free(diff_path);
return err;
}
-void
-got_worktree_rebase_pathlist_free(struct got_pathlist_head *merged_paths)
-{
- struct got_pathlist_entry *pe;
-
- TAILQ_FOREACH(pe, merged_paths, entry)
- free((char *)pe->path);
-
- got_pathlist_free(merged_paths);
-}
-
static const struct got_error *
store_commit_id(const char *commit_ref_name, struct got_object_id *commit_id,
int is_rebase, struct got_repository *repo)
done:
TAILQ_FOREACH(pe, &commitable_paths, entry) {
struct got_commitable *ct = pe->data;
+
free_commitable(ct);
}
- got_pathlist_free(&commitable_paths);
+ got_pathlist_free(&commitable_paths, GOT_PATHLIST_FREE_NONE);
free(fileindex_path);
return err;
}
blob - c5187ac077f1a2bce176f2378882a6f94b7cdf3b
blob + c2b23a762db0ab53b3f2b625b26efb74dddcd5c5
--- libexec/got-fetch-pack/got-fetch-pack.c
+++ libexec/got-fetch-pack/got-fetch-pack.c
"pack file checksum mismatch");
}
done:
- TAILQ_FOREACH(pe, &symrefs, entry) {
- free((void *)pe->path);
- free(pe->data);
- }
- got_pathlist_free(&symrefs);
+ got_pathlist_free(&symrefs, GOT_PATHLIST_FREE_ALL);
free(have);
free(want);
free(id_str);
struct got_pathlist_head have_refs;
struct got_pathlist_head wanted_branches;
struct got_pathlist_head wanted_refs;
- struct got_pathlist_entry *pe;
struct got_imsg_fetch_request fetch_req;
struct got_imsg_fetch_have_ref href;
struct got_imsg_fetch_wanted_branch wbranch;
fetch_req.fetch_all_branches, &wanted_branches,
&wanted_refs, fetch_req.list_refs_only, &ibuf);
done:
- TAILQ_FOREACH(pe, &have_refs, entry) {
- free((char *)pe->path);
- free(pe->data);
- }
- got_pathlist_free(&have_refs);
- TAILQ_FOREACH(pe, &wanted_branches, entry)
- free((char *)pe->path);
- got_pathlist_free(&wanted_branches);
+ got_pathlist_free(&have_refs, GOT_PATHLIST_FREE_ALL);
+ got_pathlist_free(&wanted_branches, GOT_PATHLIST_FREE_PATH);
if (fetchfd != -1 && close(fetchfd) == -1 && err == NULL)
err = got_error_from_errno("close");
if (packfd != -1 && close(packfd) == -1 && err == NULL)
blob - 25ceb461a55b156e97ba7cb19ae2652323c8821f
blob + 656b13122b6f3d7d7e5f8f57d12e56cb416e130a
--- libexec/got-send-pack/got-send-pack.c
+++ libexec/got-send-pack/got-send-pack.c
err = send_done(ibuf);
done:
- TAILQ_FOREACH(pe, &their_refs, entry) {
- free((void *)pe->path);
- free(pe->data);
- }
- got_pathlist_free(&their_refs);
+ got_pathlist_free(&their_refs, GOT_PATHLIST_FREE_ALL);
free(id_str);
free(id);
free(refname);
struct imsg imsg;
struct got_pathlist_head refs;
struct got_pathlist_head delete_refs;
- struct got_pathlist_entry *pe;
struct got_imsg_send_request send_req;
struct got_imsg_send_ref href;
size_t datalen, i;
err = send_pack(sendfd, &refs, &delete_refs, &ibuf);
done:
- TAILQ_FOREACH(pe, &refs, entry) {
- free((char *)pe->path);
- free(pe->data);
- }
- got_pathlist_free(&refs);
- TAILQ_FOREACH(pe, &delete_refs, entry) {
- free((char *)pe->path);
- free(pe->data);
- }
- got_pathlist_free(&delete_refs);
+ got_pathlist_free(&refs, GOT_PATHLIST_FREE_ALL);
+ got_pathlist_free(&delete_refs, GOT_PATHLIST_FREE_ALL);
if (sendfd != -1 && close(sendfd) == -1 && err == NULL)
err = got_error_from_errno("close");
if (err != NULL && err->code != GOT_ERR_CANCELLED) {
blob - 1b4e2a08ae74cbaca233fe92241caa8848454f5d
blob + fad15574f54715f8f62105579fbc58c1ca5d1bf1
--- regress/path/path_test.c
+++ regress/path/path_test.c
i++;
}
- got_pathlist_free(&paths);
+ got_pathlist_free(&paths, GOT_PATHLIST_FREE_NONE);
return 1;
}
i++;
}
- got_pathlist_free(&paths);
+ got_pathlist_free(&paths, GOT_PATHLIST_FREE_NONE);
return 1;
}
blob - d7fa2c1d153bc59e73ad0c79620bfe35b71ffc14
blob + b3aa6afcd77d0a0e0cca4debbca5263d8a69f68e
--- tog/tog.c
+++ tog/tog.c
GOT_DIFF_LINE_CHANGES);
if (err)
goto done;
- free((char *)pe->path);
- free(pe->data);
}
fputc('\n', outfile);
outoff++;
err = add_line_metadata(lines, nlines, outoff, GOT_DIFF_LINE_NONE);
done:
- got_pathlist_free(&changed_paths);
+ got_pathlist_free(&changed_paths, GOT_PATHLIST_FREE_ALL);
free(id_str);
free(logmsg);
free(refs_str);