[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 2/5] libxl: make GC_FREE reachable in libxl_get_scheduler()



Coverity CID 1343309

This patch preserves the multiple error paths in order to avoid
meaninglessly assigning the ERROR_FAIL libxl error code to the
return variable, which is of type libxl_scheduler.

Signed-off-by: Joshua Otto <jtotto@xxxxxxxxxxxx>
---
 tools/libxl/libxl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index ca4679b..60a2509 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -5590,8 +5590,8 @@ libxl_scheduler libxl_get_scheduler(libxl_ctx *ctx)
     int r = xc_sched_id(ctx->xch, (int *)&sched);
     if (r != 0) {
         LOGE(ERROR, "getting current scheduler id");
-        return ERROR_FAIL;
         GC_FREE;
+        return ERROR_FAIL;
     }
     GC_FREE;
     return sched;
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.