ia64/xen-unstable

changeset 13006:e2792d1612b3

Check return of new_domain inside dom0_init, avoiding segfault if there is
a second instance of xenstored running (and we're using different pid files).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Wed Dec 13 11:13:08 2006 +0000 (2006-12-13)
parents dd6bbf10e79a
children 87f220709073
files tools/xenstore/xenstored_domain.c
line diff
     1.1 --- a/tools/xenstore/xenstored_domain.c	Sat Dec 09 19:24:46 2006 +0000
     1.2 +++ b/tools/xenstore/xenstored_domain.c	Wed Dec 13 11:13:08 2006 +0000
     1.3 @@ -459,6 +459,8 @@ static int dom0_init(void)
     1.4  		return -1;
     1.5  
     1.6  	dom0 = new_domain(NULL, 0, port); 
     1.7 +	if (dom0 == NULL)
     1.8 +		return -1;
     1.9  
    1.10  	dom0->interface = xenbus_map();
    1.11  	if (dom0->interface == NULL)