From: Wei Liu Date: Mon, 14 Mar 2016 16:17:37 +0000 (+0000) Subject: libxl: use LIBXL__LOG in libxl_ctx_alloc X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1553 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c2b9b97775e9de061dd72b22fb96293daaa77f98;p=xen.git libxl: use LIBXL__LOG in libxl_ctx_alloc Coverity points out that using LOG macro dereferences gc which is NULL at that point. Use LIBXL__LOG instead. CID: 1343291 Signed-off-by: Wei Liu Acked-by: Ian Jackson --- diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 4cdc1690c4..93e228d88d 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -90,7 +90,7 @@ int libxl_ctx_alloc(libxl_ctx **pctx, int version, /* The mutex is special because we can't idempotently destroy it */ if (libxl__init_recursive_mutex(ctx, &ctx->lock) < 0) { - LOG(ERROR, "Failed to initialize mutex"); + LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Failed to initialize mutex"); free(ctx); ctx = 0; rc = ERROR_FAIL;