[libvirt] [PATCH] uml_conf.c: don't return an uninitialized pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Another "real" bug:

>From 6697607bf0b023ffb692576b31d652d10719b08a Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@xxxxxxxxxx>
Date: Thu, 3 Sep 2009 12:05:52 +0200
Subject: [PATCH] uml_conf.c: don't return an uninitialized pointer

* src/uml_conf.c (umlBuildCommandLineChr): Initialize "ret" also
in the final switch cases.
---
 src/uml_conf.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/uml_conf.c b/src/uml_conf.c
index 838fedd..2e9c25c 100644
--- a/src/uml_conf.c
+++ b/src/uml_conf.c
@@ -331,6 +331,7 @@ umlBuildCommandLineChr(virConnectPtr conn,
     default:
         umlReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
                        _("unsupported chr device type %d"), def->type);
+        ret = NULL;
         break;
     }

--
1.6.4.2.395.ge3d52

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]