Commit ade1f1c
diff --no-index: fix logic for paths ending in '/'
Junio C Hamano <[email protected]> writes:
> Hence, I think the clean-up code of this function this goto ...
>
>> goto out;
>
> ... jumps to would need
>
> strbuf_release(&ps_match1);
> strbuf_release(&ps_match2);
>
> added after that "out:" label?
>
> If we run this test with leak sanitizer, wouldn't it find leak in
> these (I haven't tried it myself---I just am speculating)?
Now I did, and my speculations were both correct. The SANITIZE=leak
build fails, and with these two releases the test passes.
You can squash this in, or I can do so myself if you like, if this
is the only change that is required.
diff-no-index.c | 2 ++
1 file changed, 2 insertions(+)
Signed-off-by: Johannes Schindelin <[email protected]>1 parent 18c819b commit ade1f1c
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
| 439 | + | |
| 440 | + | |
439 | 441 | | |
440 | 442 | | |
441 | 443 | | |
| |||
0 commit comments