commit 6b89d48589d6584c63c8b9dd8b0abde8501bcc92 from: Kyle Ackerman via: Thomas Adam date: Thu May 15 16:08:55 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 - 56a0cc310dea25836a22e707244b42306dba5539 commit + 6b89d48589d6584c63c8b9dd8b0abde8501bcc92 blob - 2f0107d30542ab7461e91e093a372fc1d8f9e8f7 blob + 78e73293315f22e5b1ca708f3621aa3c1f39e60f --- 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; }