mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-08 18:37:34 +00:00
Use GLib memory functions for RedsMigSpice::cert_subject
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
b4e05a0398
commit
5ccad96671
@ -139,9 +139,9 @@ static void main_channel_fill_mig_target(MainChannel *main_channel, RedsMigSpice
|
||||
spice_assert(mig_target);
|
||||
g_free(main_channel->mig_target.host);
|
||||
main_channel->mig_target.host = g_strdup(mig_target->host);
|
||||
free(main_channel->mig_target.cert_subject);
|
||||
g_free(main_channel->mig_target.cert_subject);
|
||||
if (mig_target->cert_subject) {
|
||||
main_channel->mig_target.cert_subject = spice_strdup(mig_target->cert_subject);
|
||||
main_channel->mig_target.cert_subject = g_strdup(mig_target->cert_subject);
|
||||
} else {
|
||||
main_channel->mig_target.cert_subject = NULL;
|
||||
}
|
||||
|
||||
@ -2963,7 +2963,7 @@ static void reds_set_one_channel_security(RedsState *reds, int id, uint32_t secu
|
||||
static void reds_mig_release(RedServerConfig *config)
|
||||
{
|
||||
if (config->mig_spice) {
|
||||
free(config->mig_spice->cert_subject);
|
||||
g_free(config->mig_spice->cert_subject);
|
||||
g_free(config->mig_spice->host);
|
||||
g_free(config->mig_spice);
|
||||
config->mig_spice = NULL;
|
||||
@ -4119,7 +4119,7 @@ static int reds_set_migration_dest_info(RedsState *reds,
|
||||
spice_migration->sport = secure_port;
|
||||
spice_migration->host = g_strdup(dest);
|
||||
if (cert_subject) {
|
||||
spice_migration->cert_subject = spice_strdup(cert_subject);
|
||||
spice_migration->cert_subject = g_strdup(cert_subject);
|
||||
}
|
||||
|
||||
reds->config->mig_spice = spice_migration;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user