[PATCH 05/21] domain_conf.c: do not leak 'video' in virDomainDefParseXML()
Michal Privoznik
mprivozn at redhat.com
Tue Dec 1 18:46:28 UTC 2020
On 11/24/20 8:20 PM, Daniel Henrique Barboza wrote:
> The 'video' pointer is only being freed on error path, meaning
> that we're leaking it after each loop restart.
>
> There are more opportunities for auto cleanups of virDomainVideoDef
> pointers, so let's register AUTOPTR_CLEANUP_FUNC for it to use
> g_autoptr() later on.
>
> Signed-off-by: Daniel Henrique Barboza <danielhb413 at gmail.com>
> ---
> src/conf/domain_conf.c | 4 +---
> src/conf/domain_conf.h | 1 +
> 2 files changed, 2 insertions(+), 3 deletions(-)
Reviewed-by: Michal Privoznik <mprivozn at redhat.com>
Michal
More information about the libvir-list
mailing list