diff options
author | Jeff King <peff@peff.net> | 2012-10-23 15:36:12 -0400 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2012-10-24 03:36:53 -0400 |
commit | 35998c89381a56b28433852386986aafde92428d (patch) | |
tree | 03b880a1544faa865e972d9ae5c2b905c979abfc /builtin/config.c | |
parent | cb20b69166786210bcad406c192763f90be1639a (diff) | |
download | git-35998c89381a56b28433852386986aafde92428d.tar.gz |
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: Jeff King <peff@peff.net>
Diffstat (limited to 'builtin/config.c')
-rw-r--r-- | builtin/config.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/config.c b/builtin/config.c index e1c33e0691..e660d48300 100644 --- a/builtin/config.c +++ b/builtin/config.c @@ -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); |