When an unknown NIC type is passed to
gvir_designer_domain_add_interface_full(), 'ret' would be returned
uninitialized to the caller.
---
libvirt-designer/libvirt-designer-domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt-designer/libvirt-designer-domain.c
b/libvirt-designer/libvirt-designer-domain.c
index 5475c79..7387ab1 100644
--- a/libvirt-designer/libvirt-designer-domain.c
+++ b/libvirt-designer/libvirt-designer-domain.c
@@ -1872,7 +1872,7 @@ gvir_designer_domain_add_interface_full(GVirDesignerDomain *design,
const char *network,
GError **error)
{
- GVirConfigDomainInterface *ret;
+ GVirConfigDomainInterface *ret = NULL;
const gchar *model = NULL;
model = gvir_designer_domain_get_preferred_nic_model(design, error);
--
2.1.0