xenstored: fix faulty check for bad handle in domain_init

Coverity-ID: 1054975
Coverity-ID: 1055196
Signed-off-by: Matthew Daley <mattjd@gmail.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
Matthew Daley authored and Ian Campbell committed 2013-09-25 13:23:12 +01:00
1 parent b865bda00f
commit 07fa854a43
1 file changed
+1 -1
+1 -1
View File
@@ -640,7 +640,7 @@ void domain_init(void)
barf_perror("Failed to allocate domain gnttab handle");
*xcg_handle = xc_gnttab_open(NULL, 0);
if (*xcg_handle < 0)
if (*xcg_handle == NULL)
xprintf("WARNING: Failed to open connection to gnttab\n");
else
talloc_set_destructor(xcg_handle, close_xcg_handle);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.