diff options
author | Matthew DeVore <matvore@google.com> | 2018-10-05 14:31:26 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-10-07 08:55:00 +0900 |
commit | cc0b05a4cc54c30a5355a9da5d76b1879d960628 (patch) | |
tree | 35bbd54f2957dec2df68671ee51c0a33eef8fc33 /chdir-notify.h | |
parent | list-objects-filter: use BUG rather than die (diff) | |
download | tgif-cc0b05a4cc54c30a5355a9da5d76b1879d960628.tar.xz |
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 <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'chdir-notify.h')
0 files changed, 0 insertions, 0 deletions