* [PATCH] libxl: use LIBXL__LOG in libxl_ctx_alloc
@ 2016-03-14 16:17 Wei Liu
2016-03-14 17:13 ` Ian Jackson
0 siblings, 1 reply; 2+ messages in thread
From: Wei Liu @ 2016-03-14 16:17 UTC (permalink / raw)
To: Xen-devel; +Cc: Ian Jackson, Wei Liu
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 <wei.liu2@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
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 4cdc169..93e228d 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;
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libxl: use LIBXL__LOG in libxl_ctx_alloc
2016-03-14 16:17 [PATCH] libxl: use LIBXL__LOG in libxl_ctx_alloc Wei Liu
@ 2016-03-14 17:13 ` Ian Jackson
0 siblings, 0 replies; 2+ messages in thread
From: Ian Jackson @ 2016-03-14 17:13 UTC (permalink / raw)
To: Wei Liu; +Cc: Xen-devel
Wei Liu writes ("[PATCH] 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 <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-14 17:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-14 16:17 [PATCH] libxl: use LIBXL__LOG in libxl_ctx_alloc Wei Liu
2016-03-14 17:13 ` Ian Jackson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).