提交 35998c89 编写于 作者: J Jeff King

git-config: remove memory leak of key regexp

This is only called once per invocation, so it's not a major
leak, but it's easy to fix.
Signed-off-by: NJeff King <peff@peff.net>
上级 cb20b691
......@@ -248,6 +248,10 @@ static int get_value(const char *key_, const char *regex_)
git_config_from_file(fn, system_wide, data);
free(key);
if (key_regexp) {
regfree(key_regexp);
free(key_regexp);
}
if (regexp) {
regfree(regexp);
free(regexp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册