Thread (4 messages) flat view 4 messages, 4 authors, 2017-01-09

Re: [PATCH v4 1/4] Avoid Coverity warning about unfree()d git_exec_path()

From: Stefan Beller <hidden>
Date: 2017-01-09 19:21:47

Possibly related (same subject, not in this thread)

On Sun, Jan 8, 2017 at 5:25 PM, Junio C Hamano [off-list ref] wrote:
So with the above, are you saying "Dscho said 'hopefully', and I
confirm that this change does squelch misdiagnosis by Coverity"?
I could not find the coverity issue any more.
(It really misses easy access to "recently fixed" problems)
commit c9bb5d101ca657fa466afa8c4368c43ea7b7aca8
Author: Johannes Schindelin [off-list ref]
Date:   Mon Jan 2 17:22:33 2017 +0100

    git_exec_path: avoid Coverity warning about unfree()d result

    Technically, it is correct that git_exec_path() returns a possibly
    malloc()ed string returned from system_path(), and it is sometimes
    not allocated.  Cache the result in a static variable and make sure
    that we call system_path() only once, which plugs a potential leak.

    Signed-off-by: Johannes Schindelin [off-list ref]
    Signed-off-by: Junio C Hamano [off-list ref]
Sounds good to me,

Thanks,
Stefan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help