ia64/xen-unstable

changeset 11769:9ab5db36c987

[BLKTAP] Fix crash at start-of-day in blktapctrld
if /local/domain does not exist.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Fri Oct 06 15:05:30 2006 +0100 (2006-10-06)
parents ff9746d600e9
children f071be18e85f
files tools/blktap/lib/xs_api.c
line diff
     1.1 --- a/tools/blktap/lib/xs_api.c	Fri Oct 06 15:04:42 2006 +0100
     1.2 +++ b/tools/blktap/lib/xs_api.c	Fri Oct 06 15:05:30 2006 +0100
     1.3 @@ -179,6 +179,8 @@ char *get_dom_domid(struct xs_handle *h)
     1.4  	}
     1.5  	
     1.6  	e = xs_directory(h, xth, "/local/domain", &num);
     1.7 +	if (e == NULL)
     1.8 +	    return NULL;
     1.9  
    1.10  	for (i = 0; (i < num) && (domid == NULL); i++) {
    1.11  		asprintf(&path, "/local/domain/%s/name", e[i]);