On 02/08/2018 03:58 PM, Marek Marczykowski-Górecki wrote:
libxlDriverConfigNew() use libxlDriverConfigDispose() for cleanup in
case of errors. Do not call libxlLoggerFree() on not allocated logger
(NULL).
---
Changes since v3:
- new patch, mostly unrelated, but found while adjusting tests
Trivial. I'd push it, but you need to add a S-O-B to patches now. See commit
d64d5ccb06.
Reviewed-by: Jim Fehlig <jfehlig(a)suse.com>
Regards,
Jim
---
src/libxl/libxl_conf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 970cff2..2d2a707 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -80,7 +80,8 @@ libxlDriverConfigDispose(void *obj)
virObjectUnref(cfg->caps);
libxl_ctx_free(cfg->ctx);
- libxlLoggerFree(cfg->logger);
+ if (cfg->logger)
+ libxlLoggerFree(cfg->logger);
VIR_FREE(cfg->configDir);
VIR_FREE(cfg->autostartDir);