Re: [PATCH 15/17] hook: provide stdin by string_list or callback
- From
Emily Shaffer <emilyshaffer@google.com>
- Date
- Dec 8, 2020, 22:11 UTC
- Message-ID
- <20201208221155.GC3783238@google.com>
- In-Reply-To
- <20201208210925.GI8396@szeder.dev>
On Tue, Dec 08, 2020 at 10:09:25PM +0100, SZEDER Gábor wrote:
Show 14 quoted lines
>
> On Fri, Dec 04, 2020 at 05:46:05PM -0800, Emily Shaffer wrote:
> > diff --git a/hook.c b/hook.c
> > index f0c052d847..fbb49f241d 100644
> > --- a/hook.c
> > +++ b/hook.c
> > @@ -9,6 +9,8 @@ void free_hook(struct hook *ptr)
> > {
> > if (ptr) {
> > strbuf_release(&ptr->command);
> > + if (ptr->feed_pipe_cb_data)
>
> Coccinelle suggests to drop this condition, because free() can handle
> a NULL pointer just fine.Done (locally). Thanks (and thanks for checking the coccinelle output too).
Show 5 quoted lines
> > > + free(ptr->feed_pipe_cb_data); > > free(ptr); > > } > > }