Re: [PATCH 02/20] transport-helper: fix leaking helper name
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- May 24, 2024, 20:38 UTC
- Message-ID
- <CAOLa=ZS09FYrFUvUYzoBy27q3NSEXEO--4mCCqLSwZXDCD155Q@mail.gmail.com>
- In-Reply-To
- <05fbadbae2184479c87c37675dde7bd79b3e32ab.1716465556.git.ps@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 7 quoted lines
> When initializing the transport helper in `transport_get()`, we > allocate the name of the helper. We neither end up transferring > ownership of the name, nor do we free it. The associated memory thus > leaks. > > Fix this memory leak and mark now-passing tests as leak free. >
So this is done by removing the `const` from the `name` field in `helper_data` so we can assign and free its memory. Looks good.
[snip]