mbox series

[0/5] gqa-win: get_pci_info: Fix memory leak

Message ID 20211213111554.62394-1-konstantin@daynix.com (mailing list archive)
Headers show
Series gqa-win: get_pci_info: Fix memory leak | expand

Message

Konstantin Kostiuk Dec. 13, 2021, 11:15 a.m. UTC
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

Kostiantyn Kostiuk (5):
  gqa-win: get_pci_info: Clean dev_info if handle is valid
  gqa-win: get_pci_info: Use common 'cleanup' label
  gqa-win: get_pci_info: Free parent_dev_info properly
  gqa-win: get_pci_info: Replace 'while' with 2 calls of the function
  gqa-win: get_pci_info: Add g_autofree for few variables

 qga/commands-win32.c | 74 ++++++++++++++++++++++++++++----------------
 1 file changed, 47 insertions(+), 27 deletions(-)

--
2.25.1