mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
libxl: fix libxlDriverConfigDispose for partially constructed object
libxlDriverConfigNew() use libxlDriverConfigDispose() for cleanup in case of errors. Do not call libxlLoggerFree() on not allocated logger (NULL). Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Reviewed-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
5ecccf9d27
commit
13019ba8e1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user