[libvirt] [PATCH] openvz_conf.c: don't use undefined local, "net"

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

 



This looks like a real bug.

>From 170af3320e68a0ac2cfe854fba28abe0e4040d2c Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@xxxxxxxxxx>
Date: Thu, 3 Sep 2009 11:24:44 +0200
Subject: [PATCH] openvz_conf.c: don't use undefined local, "net"

* src/openvz_conf.c (openvzReadNetworkConf): Upon openvzRead... failure,
simply return -1, rather than "goto error;" where an uninitialized
"net" could be dereferenced.
---
 src/openvz_conf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/openvz_conf.c b/src/openvz_conf.c
index a172fe3..b1cb31a 100644
--- a/src/openvz_conf.c
+++ b/src/openvz_conf.c
@@ -197,7 +197,7 @@ openvzReadNetworkConf(virConnectPtr conn,
         openvzError(conn, VIR_ERR_INTERNAL_ERROR,
                  _("Could not read 'IP_ADDRESS' from config for container %d"),
                   veid);
-        goto error;
+        return -1;
     } else if (ret > 0) {
         token = strtok_r(temp, " ", &saveptr);
         while (token != NULL) {
--
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]