From: Matthew Daley Date: Wed, 18 Sep 2013 03:37:54 +0000 (+1200) Subject: xenstored: handle unlikely failure better in ask_parents X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~6280 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b865bda00f7cf5b0703e3d23ca22c8d1f607a1dd;p=xen.git xenstored: handle unlikely failure better in ask_parents Coverity-ID: 1055277 Signed-off-by: Matthew Daley Acked-by: Ian Campbell --- diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index a2cf2a66a3..0f8ba64499 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); }