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

[Xen-devel] [PATCH 18/28] xenstored: handle unlikely failure better in ask_parents



Coverity-ID: 1055277
Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx>
---
 tools/xenstore/xenstored_core.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c
index a2cf2a6..0f8ba64 100644
--- a/tools/xenstore/xenstored_core.c
+++ b/tools/xenstore/xenstored_core.c
@@ -523,8 +523,10 @@ static enum xs_perm_type ask_parents(struct connection 
*conn, const char *name)
        } while (!streq(name, "/"));
 
        /* No permission at root?  We're in trouble. */
-       if (!node)
+       if (!node) {
                corrupt(conn, "No permissions file at root");
+               return XS_PERM_NONE;
+       }
 
        return perm_for_conn(conn, node->perms, node->num_perms);
 }
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.