From: Matthew Daley Date: Wed, 18 Sep 2013 03:37:52 +0000 (+1200) Subject: libxl: fix file open failure check in libxl__file_reference_map X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~6281 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1a0f10a8c8673ed62c7b0cff8f8de5b97c402b7d;p=xen.git libxl: fix file open failure check in libxl__file_reference_map Coverity-ID: 1055567 Signed-off-by: Matthew Daley Acked-by: Ian Campbell --- diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c index 5a8cd38bf9..cf17658a7f 100644 --- a/tools/libxl/libxl_internal.c +++ b/tools/libxl/libxl_internal.c @@ -228,7 +228,7 @@ int libxl__file_reference_map(libxl__file_reference *f) return 0; fd = open(f->path, O_RDONLY); - if (f < 0) + if (fd < 0) return ERROR_FAIL; ret = fstat(fd, &st_buf);