diff options
author | Peter Xu <peterx@redhat.com> | 2022-07-07 14:55:15 -0400 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2022-07-20 12:15:09 +0100 |
commit | 9a2666275215048c73f1d66f7d57d7ea32328082 (patch) | |
tree | 88496042e4e163216f8a95630bd27f905e4c0f3b /event-loop-base.c | |
parent | 85a8578ea501029f10f5d19d88115adee0ae10cc (diff) | |
download | qemu-9a2666275215048c73f1d66f7d57d7ea32328082.zip qemu-9a2666275215048c73f1d66f7d57d7ea32328082.tar.gz qemu-9a2666275215048c73f1d66f7d57d7ea32328082.tar.bz2 |
migration: Export tls-[creds|hostname|authz] params to cmdline too
It's useful for specifying tls credentials all in the cmdline (along with
the -object tls-creds-*), especially for debugging purpose.
The trick here is we must remember to not free these fields again in the
finalize() function of migration object, otherwise it'll cause double-free.
The thing is when destroying an object, we'll first destroy the properties
that bound to the object, then the object itself. To be explicit, when
destroy the object in object_finalize() we have such sequence of
operations:
object_property_del_all(obj);
object_deinit(obj, ti);
So after this change the two fields are properly released already even
before reaching the finalize() function but in object_property_del_all(),
hence we don't need to free them anymore in finalize() or it's double-free.
This also fixes a trivial memory leak for tls-authz as we forgot to free it
before this patch.
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20220707185515.27475-1-peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'event-loop-base.c')
0 files changed, 0 insertions, 0 deletions