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: Zongmin Zhou
Subject: Re: [PATCH v3] migration: free 'saddr' since be no longer used
Date: Wed, 29 Nov 2023 10:09:12 +0800
User-agent: Mozilla Thunderbird

Ping? Has this been forgotten?

Best regards!

On 2023/11/20 22:01, Peter Xu wrote:
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>




reply via email to

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