The dom_info struct is not allocated before use. 

Move the fucntion xc_domain_getinfolist code to the place after dom_info = malloc(sizeof(xc_domaininfo_t))