Compare
3a055174da48a6723677767e2a18bc95aa7eee24..d306f3f0d5bac2f59a47ccf2cff2f07da95c2ba9
Merge branch 'ks/history-commit-leakfix'
The memory leak caused by not unusing the commit buffer returned by repo_logmsg_reencode() during the rewording operation in 'git history' has been plugged. * ks/history-commit-leakfix: builtin/history: unuse the commit buffer after use
Junio C Hamano <gitster@pobox.com> · 2026-09-16 16:04 UTC
2 files changed,
+3
−2
modified builtin/history.c
| @@ -161,6 +161,7 @@ out: | |||
| 161 | 161 | free_commit_extra_headers(original_extra_headers); | |
| 162 | 162 | strbuf_release(&commit_message); | |
| 163 | 163 | free(original_author); | |
| 164 | + | repo_unuse_commit_buffer(repo, commit_with_message, original_message); | |
| 164 | 165 | return ret; | |
| 165 | 166 | } | |
| 166 | 167 | ||
modified src/cargo-meson.sh
| @@ -38,7 +38,7 @@ then | |||
| 38 | 38 | exit $RET | |
| 39 | 39 | fi | |
| 40 | 40 | ||
| 41 | - | if ! cmp "$BUILD_DIR/$BUILD_TYPE/$LIBNAME" "$BUILD_DIR/libgitcore.a" >/dev/null 2>&1 | |
| 41 | + | if ! cmp "$BUILD_DIR/${CARGO_BUILD_TARGET:+$CARGO_BUILD_TARGET/}$BUILD_TYPE/$LIBNAME" "$BUILD_DIR/libgitcore.a" >/dev/null 2>&1 | |
| 42 | 42 | then | |
| 43 | - | cp "$BUILD_DIR/$BUILD_TYPE/$LIBNAME" "$BUILD_DIR/libgitcore.a" | |
| 43 | + | cp "$BUILD_DIR/${CARGO_BUILD_TARGET:+$CARGO_BUILD_TARGET/}$BUILD_TYPE/$LIBNAME" "$BUILD_DIR/libgitcore.a" | |
| 44 | 44 | fi | |