mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-10 23:57:38 +00:00
Use GLib memory functions for RedsMigSpice::host
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
30205766b6
commit
5c4df2f6c3
@ -137,8 +137,8 @@ void main_channel_push_multi_media_time(MainChannel *main_chan, uint32_t time)
|
||||
static void main_channel_fill_mig_target(MainChannel *main_channel, RedsMigSpice *mig_target)
|
||||
{
|
||||
spice_assert(mig_target);
|
||||
free(main_channel->mig_target.host);
|
||||
main_channel->mig_target.host = spice_strdup(mig_target->host);
|
||||
g_free(main_channel->mig_target.host);
|
||||
main_channel->mig_target.host = g_strdup(mig_target->host);
|
||||
free(main_channel->mig_target.cert_subject);
|
||||
if (mig_target->cert_subject) {
|
||||
main_channel->mig_target.cert_subject = spice_strdup(mig_target->cert_subject);
|
||||
|
||||
@ -2964,7 +2964,7 @@ static void reds_mig_release(RedServerConfig *config)
|
||||
{
|
||||
if (config->mig_spice) {
|
||||
free(config->mig_spice->cert_subject);
|
||||
free(config->mig_spice->host);
|
||||
g_free(config->mig_spice->host);
|
||||
free(config->mig_spice);
|
||||
config->mig_spice = NULL;
|
||||
}
|
||||
@ -4117,7 +4117,7 @@ static int reds_set_migration_dest_info(RedsState *reds,
|
||||
spice_migration = spice_new0(RedsMigSpice, 1);
|
||||
spice_migration->port = port;
|
||||
spice_migration->sport = secure_port;
|
||||
spice_migration->host = spice_strdup(dest);
|
||||
spice_migration->host = g_strdup(dest);
|
||||
if (cert_subject) {
|
||||
spice_migration->cert_subject = spice_strdup(cert_subject);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user