On 03.04.2016 22:23, Martin Kletzander wrote: > It's the counterpart of qemuDomainSetPrivatePaths(). > > Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx> > --- > src/qemu/qemu_domain.c | 10 ++++++++++ > src/qemu/qemu_domain.h | 1 + > src/qemu/qemu_process.c | 3 +-- > 3 files changed, 12 insertions(+), 2 deletions(-) > > diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c > index 6102f7983f58..f38b0f381030 100644 > --- a/src/qemu/qemu_domain.c > +++ b/src/qemu/qemu_domain.c > @@ -562,6 +562,16 @@ qemuDomainSetPrivatePaths(virQEMUDriverPtr driver, > } > > > +void > +qemuDomainClearPrivatePaths(virDomainObjPtr vm) > +{ > + qemuDomainObjPrivatePtr priv = vm->privateData; > + > + VIR_FREE(priv->libDir); > + VIR_FREE(priv->channelTargetDir); > +} > + > + > static void * > qemuDomainObjPrivateAlloc(void) > { > diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h > index 918a77dabd29..54d7bd74f3be 100644 > --- a/src/qemu/qemu_domain.h > +++ b/src/qemu/qemu_domain.h > @@ -554,6 +554,7 @@ int qemuDomainNetVLAN(virDomainNetDefPtr def); > int qemuDomainSetPrivatePaths(virQEMUDriverPtr driver, > virDomainObjPtr vm); > > +void qemuDomainClearPrivatePaths(virDomainObjPtr vm); > > virDomainDiskDefPtr qemuDomainDiskByName(virDomainDefPtr def, const char *name); > > diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c > index 02c13bcfbb38..d9dca7485387 100644 > --- a/src/qemu/qemu_process.c > +++ b/src/qemu/qemu_process.c > @@ -5832,8 +5832,7 @@ void qemuProcessStop(virQEMUDriverPtr driver, > virFileDeleteTree(priv->libDir); > virFileDeleteTree(priv->channelTargetDir); > > - VIR_FREE(priv->libDir); > - VIR_FREE(priv->channelTargetDir); > + qemuDomainClearPrivatePaths(vm); > > ignore_value(virDomainChrDefForeach(vm->def, > false, > I think this can be merged with 1/3. Michal -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list