qemu-devel
[Top][All Lists]
Advanced

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

[PATCH v2 0/6] gqa-win: get_pci_info: Fix memory leak


From: Kostiantyn Kostiuk
Subject: [PATCH v2 0/6] gqa-win: get_pci_info: Fix memory leak
Date: Tue, 14 Dec 2021 14:41:03 +0200

This set of patches fixes memory leaks in the get_pci_info function when it 
fails
to get parent device data. In this case the parent_dev_info and the 
parent_dev_id
variables will be initialized, but not freed.

Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1958825

Changelog:
v1 -> v2
 * Rename label "cleanup" -> "end"
 * Reorder some patches
 * Perform small refactoring: split logic to separate functions

Kostiantyn Kostiuk (6):
  gqa-win: get_pci_info: Clean dev_info if handle is valid
  gqa-win: get_pci_info: Use common 'end' label
  gqa-win: get_pci_info: Free parent_dev_info properly
  gqa-win: get_pci_info: Split logic to separate functions
  gqa-win: get_pci_info: Add g_autofree for few variables
  gqa-win: get_pci_info: Replace 'while' with 2 calls of the function

 qga/commands-win32.c | 235 ++++++++++++++++++++++++-------------------
 1 file changed, 134 insertions(+), 101 deletions(-)

--
2.25.1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]