From: Patrick Steinhardt <ps@pks.im>
To: Adrian Ratiu <adrian.ratiu@collabora.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Emily Shaffer <emilyshaffer@google.com>,
correctmost <cmlists@sent.com>
Subject: Re: [PATCH][next] hook: check for NULL pointer before deref
Date: Fri, 9 Jan 2026 16:51:38 +0100 [thread overview]
Message-ID: <aWEkCqABozBzT-QS@pks.im> (raw)
In-Reply-To: <20260109153528.476163-1-adrian.ratiu@collabora.com>
On Fri, Jan 09, 2026 at 05:35:28PM +0200, Adrian Ratiu wrote:
> diff --git a/hook.c b/hook.c
> index 35211e5ed7..c257bd3940 100644
> --- a/hook.c
> +++ b/hook.c
> @@ -148,12 +148,11 @@ int run_hooks_opt(struct repository *r, const char *hook_name,
> };
> const char *const hook_path = find_hook(r, hook_name);
> int ret = 0;
> - const struct run_process_parallel_opts opts = {
> + struct run_process_parallel_opts opts = {
> .tr2_category = "hook",
> .tr2_label = hook_name,
>
> .processes = 1,
> - .ungroup = options->ungroup,
>
> .get_next_task = pick_next_hook,
> .start_failure = notify_start_failure,
What's omitted here is that the next two lines also dereference
`options`. That'll also have to be fixed for the warning to go away.
Patrick
next prev parent reply other threads:[~2026-01-09 15:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-09 15:35 [PATCH][next] hook: check for NULL pointer before deref Adrian Ratiu
2026-01-09 15:51 ` Patrick Steinhardt [this message]
2026-01-09 15:57 ` Adrian Ratiu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aWEkCqABozBzT-QS@pks.im \
--to=ps@pks.im \
--cc=adrian.ratiu@collabora.com \
--cc=cmlists@sent.com \
--cc=emilyshaffer@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox