From: "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Derrick Stolee <stolee@gmail.com>, Victoria Dye <vdye@github.com>,
Lessley Dennington <lessleydennington@gmail.com>,
Elijah Newren <newren@gmail.com>,
Elijah Newren <newren@gmail.com>
Subject: [PATCH] sparse-checkout: fix a couple minor memory leaks
Date: Fri, 28 Jan 2022 01:58:18 +0000 [thread overview]
Message-ID: <pull.1189.git.git.1643335098710.gitgitgadget@gmail.com> (raw)
From: Elijah Newren <newren@gmail.com>
These were introduced in commit 55dfcf9591 ("sparse-checkout: clear
tracked sparse dirs", 2021-09-08) and missed in my review at the time.
Plug the leaks.
Signed-off-by: Elijah Newren <newren@gmail.com>
---
sparse-checkout: fix a couple minor memory leaks
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1189%2Fnewren%2Fsparse-directory-cleaning-memleaks-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1189/newren/sparse-directory-cleaning-memleaks-v1
Pull-Request: https://github.com/git/git/pull/1189
builtin/sparse-checkout.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/builtin/sparse-checkout.c b/builtin/sparse-checkout.c
index 679c1070368..c655517e019 100644
--- a/builtin/sparse-checkout.c
+++ b/builtin/sparse-checkout.c
@@ -185,6 +185,8 @@ static void clean_tracked_sparse_directories(struct repository *r)
item->string);
}
+ strvec_clear(&s);
+ clear_pathspec(&p);
dir_clear(&dir);
}
base-commit: 1ffcbaa1a5f10c9f706314d77f88de20a4a498c2
--
gitgitgadget
next reply other threads:[~2022-01-28 1:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 1:58 Elijah Newren via GitGitGadget [this message]
2022-01-28 15:04 ` [PATCH] sparse-checkout: fix a couple minor memory leaks Derrick Stolee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pull.1189.git.git.1643335098710.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=lessleydennington@gmail.com \
--cc=newren@gmail.com \
--cc=stolee@gmail.com \
--cc=vdye@github.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).