]> git.ipfire.org Git - thirdparty/git.git/commit - wt-status.c
abbrev_sha1_in_line: don't leak memory
authorStefan Beller <sbeller@google.com>
Fri, 1 Apr 2016 00:35:44 +0000 (17:35 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 1 Apr 2016 17:32:43 +0000 (10:32 -0700)
commit6eb6078bf5fd08028b21d80b9062a4aed83a2340
treeb0f0ed26151f56a95e3c2b5be9be5c75a5dc5ff3
parent344b548475b86f9f95e9fbcd93022f8083918cc7
abbrev_sha1_in_line: don't leak memory

`split` is of type `struct strbuf **`, and currently we are leaking split
itself as well as each element in split[i]. We have a dedicated free
function for `struct strbuf **`, which takes care of freeing all
related memory.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
wt-status.c