qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3] migration: free 'saddr' since be no longer used


From: Peter Xu
Subject: Re: [PATCH v3] migration: free 'saddr' since be no longer used
Date: Mon, 20 Nov 2023 09:01:03 -0500

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<zhouzongmin@kylinos.cn>

Reviewed-by: Peter Xu <peterx@redhat.com>

-- 
Peter Xu




reply via email to

[Prev in Thread] Current Thread [Next in Thread]