]> xenbits.xensource.com Git - xen.git/commitdiff
xenstored: fix faulty check for bad handle in domain_init
authorMatthew Daley <mattjd@gmail.com>
Wed, 18 Sep 2013 03:37:55 +0000 (15:37 +1200)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 25 Sep 2013 12:23:12 +0000 (13:23 +0100)
Coverity-ID: 1054975
Coverity-ID: 1055196
Signed-off-by: Matthew Daley <mattjd@gmail.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/xenstore/xenstored_domain.c

index bf83d5830b8130854dc2fa59a33501c7271cba66..f24bd6bd188bfcf12a6af63c0b54ca6100248420 100644 (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);