summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2014-01-26 22:55:27 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2015-03-03 12:06:57 +0100
commit119446e5093daa48c863dcec06e7bee543e38d2b (patch)
tree227413d8e4b5dec32825d76395d787b6ce7f62ac
parent5ddb0e059f4758f94ef06429b84cd88870b694c5 (diff)
Don't return uninitialized memory from gvir_designer_domain_add_interface_full()
When an unknown NIC type is passed to gvir_designer_domain_add_interface_full(), 'ret' would be returned uninitialized to the caller.
-rw-r--r--libvirt-designer/libvirt-designer-domain.c2
1 files changed, 1 insertions, 1 deletions
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);