On Wed, Sep 08, 2021 at 11:01:15AM -0700, William Douglas wrote:
Add and initialize a virChrdevs to the _virCHDomainObjPrivate
structure in order to eventually track the consoles in use by a domain.
Signed-off-by: William Douglas <william.douglas(a)intel.com>
---
src/ch/ch_domain.c | 7 +++++++
src/ch/ch_domain.h | 3 +++
2 files changed, 10 insertions(+)
diff --git a/src/ch/ch_domain.c b/src/ch/ch_domain.c
index 780a46ba00..a6b87e28e5 100644
--- a/src/ch/ch_domain.c
+++ b/src/ch/ch_domain.c
@@ -22,6 +22,7 @@
#include "ch_domain.h"
#include "viralloc.h"
+#include "virchrdev.h"
#include "virlog.h"
#include "virtime.h"
@@ -146,6 +147,11 @@ virCHDomainObjPrivateAlloc(void *opaque G_GNUC_UNUSED)
return NULL;
}
+ if (!(priv->chrdevs = virChrdevAlloc())) {
Needs
virCHDomainObjFreeJob(priv);
+ g_free(priv);
+ return NULL;
+ }
+
return priv;
}
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|