Download raw body.
tog: zap redundant free in diff error path
I noticed this while expanding diffstat to arbitrary commits.
The lines pointer is always s->lines, which is freed in error paths via
close_diff_view().
This applies on the previous diffstat diff but might apply without it.
commit 4069b8e850c874d8a006bce59bd6a66b60ed1452 (main)
from: Mark Jamsek <mark@jamsek.dev>
date: Thu Aug 15 13:41:27 2024 UTC
zap redundant free: s->lines is freed on error via close_diff_view()
M tog/tog.c | 0+ 5-
1 file changed, 0 insertions(+), 5 deletions(-)
commit - eba95b8a4f303376c3833adad398feb8e300854a
commit + 4069b8e850c874d8a006bce59bd6a66b60ed1452
blob - 3c2a7c4f7c4a6865f154ca10ac9c0ba1e7775be1
blob + edb51ae85b04dd08cbf27b51d2cdd7bbcf03063f
--- tog/tog.c
+++ tog/tog.c
@@ -5382,11 +5382,6 @@ done:
free(logmsg);
free(refs_str);
got_object_commit_close(commit);
- if (err) {
- free(*lines);
- *lines = NULL;
- *nlines = 0;
- }
return err;
}
--
Mark Jamsek <https://bsdbox.org>
GPG: F2FF 13DE 6A06 C471 CA80 E6E2 2930 DC66 86EE CF68
tog: zap redundant free in diff error path