From: Matthew DeVore Date: Fri, 5 Oct 2018 21:31:26 +0000 (-0700) Subject: list-objects-filter-options: do not over-strbuf_init X-Git-Tag: v2.20.0-rc0~129^2~3 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/cc0b05a4cc54c30a5355a9da5d76b1879d960628?ds=inline;hp=cc0b05a4cc54c30a5355a9da5d76b1879d960628 list-objects-filter-options: do not over-strbuf_init The function gently_parse_list_objects_filter is either called with errbuf=STRBUF_INIT or errbuf=NULL, but that function calls strbuf_init when errbuf is not NULL. strbuf_init is only necessary if errbuf contains garbage, and risks a memory leak if errbuf already has a non-STRBUF_INIT state. It should be the caller's responsibility to make sure errbuf is not garbage, since garbage content is easily avoidable with STRBUF_INIT. Signed-off-by: Matthew DeVore Signed-off-by: Junio C Hamano ---