qemu-devel
[Top][All Lists]
Advanced

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

[RFC 3/4] gqa-win: get_pci_info: Add g_autofree for few variables


From: Kostiantyn Kostiuk
Subject: [RFC 3/4] gqa-win: get_pci_info: Add g_autofree for few variables
Date: Mon, 9 Aug 2021 12:48:38 +0300

Signed-off-by: Kostiantyn Kostiuk <konstantin@daynix.com>
---
 qga/commands-win32.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 724ce76a0e..a8a601776d 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -539,9 +539,9 @@ static GuestPCIAddress *get_pci_info(int number, Error 
**errp)
     dev_info_data.cbSize = sizeof(SP_DEVINFO_DATA);
     dev_iface_data.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
     for (i = 0; SetupDiEnumDeviceInfo(dev_info, i, &dev_info_data); i++) {
-        PSP_DEVICE_INTERFACE_DETAIL_DATA pdev_iface_detail_data = NULL;
+        g_autofree PSP_DEVICE_INTERFACE_DETAIL_DATA pdev_iface_detail_data = 
NULL;
         STORAGE_DEVICE_NUMBER sdn;
-        char *parent_dev_id = NULL;
+        g_autofree char *parent_dev_id = NULL;
         HDEVINFO parent_dev_info;
         SP_DEVINFO_DATA parent_dev_info_data;
         DWORD j;
-- 
2.25.1




reply via email to

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