Re: [PATCH 05/21] domain_conf.c: do not leak 'video' in virDomainDefParseXML()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
  src/conf/domain_conf.c | 4 +---
  src/conf/domain_conf.h | 1 +
  2 files changed, 2 insertions(+), 3 deletions(-)

Reviewed-by: Michal Privoznik <mprivozn@xxxxxxxxxx>

Michal




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux