From: Kostiantyn Kostiuk <konstantin@daynix.com>
To: qemu-devel@nongnu.org, "Michael Roth" <michael.roth@amd.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [PATCH v2 0/6] gqa-win: get_pci_info: Fix memory leak
Date: Tue, 14 Dec 2021 14:41:03 +0200 [thread overview]
Message-ID: <20211214124109.103102-1-konstantin@daynix.com> (raw)
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
next reply other threads:[~2021-12-14 12:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-14 12:41 Kostiantyn Kostiuk [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211214124109.103102-1-konstantin@daynix.com \
--to=konstantin@daynix.com \
--cc=marcandre.lureau@redhat.com \
--cc=michael.roth@amd.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).