commit 0212f1806003f525d9caffb418e2eb93b048b9d6 from: Kyle Ackerman date: Tue May 06 22:32:33 2025 UTC 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@ commit - 160508d5f79fc6e1794247e5d44b7bb413a14e8e commit + 0212f1806003f525d9caffb418e2eb93b048b9d6 blob - 5af728df10a622bad125d0bc41ba804acfc9ccca blob + 5850c38325d36ea475f8ba42e0b9d644ec5d40d2 --- lib/gitconfig.c +++ lib/gitconfig.c @@ -306,6 +306,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; }