Re: [PATCH v4] migration: Plug memory leak with migration URIs

2023-12-01 Thread Peter Xu
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, >

Re: [PATCH v4] migration: Plug memory leak with migration URIs

2023-11-30 Thread Markus Armbruster
Peter Xu writes: > On Thu, Nov 30, 2023 at 07:35:43PM +0100, Markus Armbruster wrote: >> Peter Xu writes: >> >> > On Wed, Nov 29, 2023 at 08:43:01PM +, Het Gala wrote: >> >> migrate_uri_parse() allocates memory to 'channel' if the user >> >> opts for old syntax - uri, which is leaked becaus

Re: [PATCH v4] migration: Plug memory leak with migration URIs

2023-11-30 Thread Peter Xu
On Thu, Nov 30, 2023 at 07:35:43PM +0100, Markus Armbruster wrote: > Peter Xu writes: > > > On Wed, Nov 29, 2023 at 08:43:01PM +, Het Gala wrote: > >> migrate_uri_parse() allocates memory to 'channel' if the user > >> opts for old syntax - uri, which is leaked because there is no > >> code fo

Re: [PATCH v4] migration: Plug memory leak with migration URIs

2023-11-30 Thread Markus Armbruster
Peter Xu writes: > On Wed, Nov 29, 2023 at 08:43:01PM +, Het Gala wrote: >> migrate_uri_parse() allocates memory to 'channel' if the user >> opts for old syntax - uri, which is leaked because there is no >> code for freeing 'channel'. >> So, free channel to avoid memory leak in case where 'ch

Re: [PATCH v4] migration: Plug memory leak with migration URIs

2023-11-30 Thread Peter Xu
On Wed, Nov 29, 2023 at 08:43:01PM +, Het Gala wrote: > migrate_uri_parse() allocates memory to 'channel' if the user > opts for old syntax - uri, which is leaked because there is no > code for freeing 'channel'. > So, free channel to avoid memory leak in case where 'channels' > is empty and ur

Re: [PATCH v4] migration: Plug memory leak with migration URIs

2023-11-29 Thread Markus Armbruster
Het Gala writes: > migrate_uri_parse() allocates memory to 'channel' if the user > opts for old syntax - uri, which is leaked because there is no > code for freeing 'channel'. > So, free channel to avoid memory leak in case where 'channels' > is empty and uri parsing is required. > > Fixes: 59940

[PATCH v4] migration: Plug memory leak with migration URIs

2023-11-29 Thread Het Gala
migrate_uri_parse() allocates memory to 'channel' if the user opts for old syntax - uri, which is leaked because there is no code for freeing 'channel'. So, free channel to avoid memory leak in case where 'channels' is empty and uri parsing is required. Fixes: 5994024f ("migration: Implement Migra