All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/13] coverity: fix leaks and error paths
@ 2026-07-01  7:04 Johannes Schindelin via GitGitGadget
  2026-07-01  7:04 ` [PATCH 01/13] load_one_loose_object_map(): fix resource leak Johannes Schindelin via GitGitGadget
                   ` (14 more replies)
  0 siblings, 15 replies; 40+ messages in thread
From: Johannes Schindelin via GitGitGadget @ 2026-07-01  7:04 UTC (permalink / raw)
  To: git; +Cc: Johannes Schindelin

I wanted to whittle down the many issues reported by Coverity in the Git for
Windows project. Turns out: The vast majority of the issues are false
positives. Most of the remaining issues are in core Git proper.

This effort was forced on pause while Coverity was down from May 16
[https://web.archive.org/web/20260516152422/https://scan.coverity.com/] to
June 22
[https://web.archive.org/web/20260622182153/https://scan.coverity.com/]).

Here is a first batch of fixes for those issues.

Johannes Schindelin (13):
  load_one_loose_object_map(): fix resource leak
  loose: avoid closing invalid fd on error path
  download_https_uri_to_file(): do not leak fd upon failure
  run-command: avoid close(-1) in start_command() error paths
  run_diff_files: avoid memory leak
  line-log: avoid redundant copy that leaks in process_ranges
  dir: free allocations on parse-error paths in read_one_dir()
  submodule: fix cwd leak in get_superproject_working_tree()
  worktree: fix resource leaks when branch creation fails
  imap-send: avoid leaking the IMAP upload buffer
  reftable/table: release filter on error path
  fsmonitor: plug token-data leak on early daemon-startup failures
  mingw: make exit_process() own the process handle on all paths

 builtin/fsmonitor--daemon.c |  2 ++
 builtin/worktree.c          |  7 +++++--
 bundle-uri.c                |  2 +-
 compat/mingw.c              |  4 +---
 compat/win32/exit-process.h |  1 +
 diff-lib.c                  |  3 ++-
 dir.c                       |  9 +++++++--
 imap-send.c                 |  1 +
 line-log.c                  |  3 +--
 loose.c                     | 11 ++++++-----
 reftable/table.c            |  4 ++++
 run-command.c               |  6 +++---
 submodule.c                 |  8 ++++++--
 13 files changed, 40 insertions(+), 21 deletions(-)


base-commit: e9019fcafe0040228b8631c30f97ae1adb61bcdc
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2163%2Fdscho%2Fcoverity-fixes-leaks-and-error-paths-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2163/dscho/coverity-fixes-leaks-and-error-paths-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2163
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2026-07-05  8:24 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-01  7:04 [PATCH 00/13] coverity: fix leaks and error paths Johannes Schindelin via GitGitGadget
2026-07-01  7:04 ` [PATCH 01/13] load_one_loose_object_map(): fix resource leak Johannes Schindelin via GitGitGadget
2026-07-01  7:56   ` Patrick Steinhardt
2026-07-01 16:25   ` Junio C Hamano
2026-07-04  8:58     ` Johannes Schindelin
2026-07-01  7:04 ` [PATCH 02/13] loose: avoid closing invalid fd on error path Johannes Schindelin via GitGitGadget
2026-07-01  7:56   ` Patrick Steinhardt
2026-07-01  7:04 ` [PATCH 03/13] download_https_uri_to_file(): do not leak fd upon failure Johannes Schindelin via GitGitGadget
2026-07-01  7:04 ` [PATCH 04/13] run-command: avoid close(-1) in start_command() error paths Johannes Schindelin via GitGitGadget
2026-07-01  7:56   ` Patrick Steinhardt
2026-07-01  7:04 ` [PATCH 05/13] run_diff_files: avoid memory leak Johannes Schindelin via GitGitGadget
2026-07-01  7:56   ` Patrick Steinhardt
2026-07-04  8:58     ` Johannes Schindelin
2026-07-01  7:04 ` [PATCH 06/13] line-log: avoid redundant copy that leaks in process_ranges Johannes Schindelin via GitGitGadget
2026-07-01  8:02   ` Jeff King
2026-07-01  7:04 ` [PATCH 07/13] dir: free allocations on parse-error paths in read_one_dir() Johannes Schindelin via GitGitGadget
2026-07-01  7:56   ` Patrick Steinhardt
2026-07-04  8:58     ` Johannes Schindelin
2026-07-01  7:04 ` [PATCH 08/13] submodule: fix cwd leak in get_superproject_working_tree() Johannes Schindelin via GitGitGadget
2026-07-01  7:56   ` Patrick Steinhardt
2026-07-04  8:59     ` Johannes Schindelin
2026-07-01  7:04 ` [PATCH 09/13] worktree: fix resource leaks when branch creation fails Johannes Schindelin via GitGitGadget
2026-07-01  7:04 ` [PATCH 10/13] imap-send: avoid leaking the IMAP upload buffer Johannes Schindelin via GitGitGadget
2026-07-01  7:04 ` [PATCH 11/13] reftable/table: release filter on error path Johannes Schindelin via GitGitGadget
2026-07-01  7:04 ` [PATCH 12/13] fsmonitor: plug token-data leak on early daemon-startup failures Johannes Schindelin via GitGitGadget
2026-07-01  7:04 ` [PATCH 13/13] mingw: make exit_process() own the process handle on all paths Johannes Schindelin via GitGitGadget
2026-07-01 17:34 ` [PATCH 00/13] coverity: fix leaks and error paths Junio C Hamano
2026-07-05  8:24 ` [PATCH v2 00/12] " Johannes Schindelin via GitGitGadget
2026-07-05  8:24   ` [PATCH v2 01/12] load_one_loose_object_map(): fix resource leak Johannes Schindelin via GitGitGadget
2026-07-05  8:24   ` [PATCH v2 02/12] loose: avoid closing invalid fd on error path Johannes Schindelin via GitGitGadget
2026-07-05  8:24   ` [PATCH v2 03/12] download_https_uri_to_file(): do not leak fd upon failure Johannes Schindelin via GitGitGadget
2026-07-05  8:24   ` [PATCH v2 04/12] run-command: avoid `close(-1)` in `start_command()` error paths Johannes Schindelin via GitGitGadget
2026-07-05  8:24   ` [PATCH v2 05/12] line-log: avoid redundant copy that leaks in process_ranges Johannes Schindelin via GitGitGadget
2026-07-05  8:24   ` [PATCH v2 06/12] dir: free allocations on parse-error paths in `read_one_dir()` Johannes Schindelin via GitGitGadget
2026-07-05  8:24   ` [PATCH v2 07/12] submodule: fix cwd leak in `get_superproject_working_tree()` Johannes Schindelin via GitGitGadget
2026-07-05  8:24   ` [PATCH v2 08/12] worktree: fix resource leaks when branch creation fails Johannes Schindelin via GitGitGadget
2026-07-05  8:24   ` [PATCH v2 09/12] imap-send: avoid leaking the IMAP upload buffer Johannes Schindelin via GitGitGadget
2026-07-05  8:24   ` [PATCH v2 10/12] reftable/table: release filter on error path Johannes Schindelin via GitGitGadget
2026-07-05  8:24   ` [PATCH v2 11/12] fsmonitor: plug token-data leak on early daemon-startup failures Johannes Schindelin via GitGitGadget
2026-07-05  8:24   ` [PATCH v2 12/12] mingw: make `exit_process()` own the process handle on all paths Johannes Schindelin via GitGitGadget

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.