From: lijiejun <a_lijiejun@163.com>
To: quintela@redhat.com, peterx@redhat.com, farosas@suse.de
Cc: qemu-devel@nongnu.org, lijiejun <a_lijiejun@163.com>
Subject: [PATCH] migration: using qapi_free_SocketAddress instead of g_free
Date: Wed, 6 Dec 2023 18:01:11 +0800 [thread overview]
Message-ID: <20231206100111.2996016-1-a_lijiejun@163.com> (raw)
use unified function qapi_free_SocketAddress to free SocketAddress
object.
Signed-off-by: lijiejun <a_lijiejun@163.com>
---
migration/migration.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/migration/migration.c b/migration/migration.c
index 3ce04b2aaf..e78d31bbbf 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -493,7 +493,7 @@ bool migrate_uri_parse(const char *uri, MigrationChannel **channel,
addr->u.socket.type = saddr->type;
addr->u.socket.u = saddr->u;
/* Don't free the objects inside; their ownership moved to "addr" */
- g_free(saddr);
+ qapi_free_SocketAddress(saddr);
} else if (strstart(uri, "file:", NULL)) {
addr->transport = MIGRATION_ADDRESS_TYPE_FILE;
addr->u.file.filename = g_strdup(uri + strlen("file:"));
--
2.25.1
next reply other threads:[~2023-12-06 10:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-06 10:01 lijiejun [this message]
2023-12-06 10:57 ` [PATCH] migration: using qapi_free_SocketAddress instead of g_free Daniel P. Berrangé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231206100111.2996016-1-a_lijiejun@163.com \
--to=a_lijiejun@163.com \
--cc=farosas@suse.de \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).