[libvirt] [PATCH] qemu: process: Clear priv->namespaces on VM shutdown
Pavel Hrdina
phrdina at redhat.com
Mon May 22 13:07:30 UTC 2017
On Mon, May 22, 2017 at 01:40:01PM +0200, Peter Krempa wrote:
> Otherwise the private data entry would be kept across instances of the
> same VM even if it's not configured to do so.
>
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1453142
> ---
> src/qemu/qemu_process.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index c19bd2925..ac17da668 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -6449,6 +6449,10 @@ void qemuProcessStop(virQEMUDriverPtr driver,
> /* clean up migration data */
> VIR_FREE(priv->migTLSAlias);
>
> + /* clear previously used namespaces */
> + virBitmapFree(priv->namespaces);
> + priv->namespaces = NULL;
> +
I think that qemuDomainDestroyNamespace() would be better to use.
> /* The "release" hook cleans up additional resources */
> if (virHookPresent(VIR_HOOK_DRIVER_QEMU)) {
> char *xml = qemuDomainDefFormatXML(driver, vm->def, 0);
Reviewed-by: Pavel Hrdina <phrdina at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170522/58f973b9/attachment-0001.sig>
More information about the libvir-list
mailing list