[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4] migration: Plug memory leak with migration URIs
From: |
Peter Xu |
Subject: |
Re: [PATCH v4] migration: Plug memory leak with migration URIs |
Date: |
Fri, 1 Dec 2023 10:29:45 -0500 |
On Fri, Dec 01, 2023 at 07:19:45AM +0100, Markus Armbruster wrote:
> I meant the first visible case, i.e. if (channels). Sorry for being
> less than clear!
>
> The problem is to free the result of migrate_uri_parse().
>
> The patch's solution is to use @channel *only* for holding that result,
> so it can be g_autoptr: drop channel = channels->value from the if
> (channels) conditional.
>
> Since this breaks addr = channel->addr, we move that assignment into the
> conditionals that reach it, which lets us unbreak it the if (channels)
> one.
My bad! It also proved that my R-b was bold. :( Thanks, Markus.
Since Juan's away, I'll prepare a pull.
--
Peter Xu