Commit Diff
- Commit:
6b89d48589d6584c63c8b9dd8b0abde8501bcc92
- From:
- Kyle Ackerman <kack@kyleackerman.net>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
- Message:
- Plug a memory leak in gitconfig.c conf_parse_line frees *section before allocating a new one, which leaks *section on the last iteration of conf_parse. ok stsp@
- Actions:
- Patch | Tree
--- lib/gitconfig.c +++ lib/gitconfig.c @@ -308,6 +308,7 @@ conf_parse(struct got_gitconfig *conf, int trans, char } if (cp != line) log_print("conf_parse: last line unterminated, ignored."); + free(section); return NULL; }