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>
This commit is contained in:
parent
cb20b69166
commit
35998c8938
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user