qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] gqa-win: get_pci_info: Fix memory leak
@ 2021-12-14 12:41 Kostiantyn Kostiuk
  2021-12-14 12:41 ` [PATCH v2 1/6] gqa-win: get_pci_info: Clean dev_info if handle is valid Kostiantyn Kostiuk
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Kostiantyn Kostiuk @ 2021-12-14 12:41 UTC (permalink / raw)
  To: qemu-devel, Michael Roth, Marc-André Lureau,
	Philippe Mathieu-Daudé

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-12-14 13:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-14 12:41 [PATCH v2 0/6] gqa-win: get_pci_info: Fix memory leak Kostiantyn Kostiuk
2021-12-14 12:41 ` [PATCH v2 1/6] gqa-win: get_pci_info: Clean dev_info if handle is valid Kostiantyn Kostiuk
2021-12-14 13:26   ` Marc-André Lureau
2021-12-14 12:41 ` [PATCH v2 2/6] gqa-win: get_pci_info: Use common 'end' label Kostiantyn Kostiuk
2021-12-14 13:26   ` Marc-André Lureau
2021-12-14 12:41 ` [PATCH v2 3/6] gqa-win: get_pci_info: Free parent_dev_info properly Kostiantyn Kostiuk
2021-12-14 13:26   ` Marc-André Lureau
2021-12-14 12:41 ` [PATCH v2 4/6] gqa-win: get_pci_info: Split logic to separate functions Kostiantyn Kostiuk
2021-12-14 13:27   ` Marc-André Lureau
2021-12-14 12:41 ` [PATCH v2 5/6] gqa-win: get_pci_info: Add g_autofree for few variables Kostiantyn Kostiuk
2021-12-14 13:28   ` Marc-André Lureau
2021-12-14 12:41 ` [PATCH v2 6/6] gqa-win: get_pci_info: Replace 'while' with 2 calls of the function Kostiantyn Kostiuk
2021-12-14 13:28   ` Marc-André Lureau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).