On Mon, Nov 20, 2023 at 11:14:28AM +0800, Zongmin Zhou wrote:
> Since socket_parse() will allocate memory for 'saddr',and its value
> will pass to 'addr' that allocated by migrate_uri_parse(),
> then 'saddr' will no longer used,need to free.
> But due to 'saddr->u' is shallow copying the contents of the union,
> the members of this union containing allocated strings,and will be used after
> that.
> So just free 'saddr' itself without doing a deep free on the contents of the
> SocketAddress.
>
> Fixes: 72a8192e225c ("migration: convert migration 'uri' into
> 'MigrateAddress'")
> Signed-off-by: Zongmin Zhou<[email protected]>
Reviewed-by: Peter Xu <[email protected]>
--
Peter Xu