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

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



This looks like a real bug.

>From 170af3320e68a0ac2cfe854fba28abe0e4040d2c Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
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


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