[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 23/24] migration/qemu-file: Define g_autoptr() cleanup functio
From: |
Maciej S. Szmigiero |
Subject: |
[PATCH v3 23/24] migration/qemu-file: Define g_autoptr() cleanup function for QEMUFile |
Date: |
Sun, 17 Nov 2024 20:20:18 +0100 |
From: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>
Automatic memory management helps avoid memory safety issues.
Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
---
migration/qemu-file.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/migration/qemu-file.h b/migration/qemu-file.h
index 11c2120edd72..fdf21324df07 100644
--- a/migration/qemu-file.h
+++ b/migration/qemu-file.h
@@ -33,6 +33,8 @@ QEMUFile *qemu_file_new_input(QIOChannel *ioc);
QEMUFile *qemu_file_new_output(QIOChannel *ioc);
int qemu_fclose(QEMUFile *f);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(QEMUFile, qemu_fclose)
+
/*
* qemu_file_transferred:
*
- [PATCH v3 15/24] migration/multifd: Add migration_has_device_state_support(), (continued)
- [PATCH v3 15/24] migration/multifd: Add migration_has_device_state_support(), Maciej S. Szmigiero, 2024/11/17
- [PATCH v3 16/24] migration/multifd: Send final SYNC only after device state is complete, Maciej S. Szmigiero, 2024/11/17
- [PATCH v3 17/24] migration: Add save_live_complete_precopy_thread handler, Maciej S. Szmigiero, 2024/11/17
- [PATCH v3 18/24] vfio/migration: Don't run load cleanup if load setup didn't run, Maciej S. Szmigiero, 2024/11/17
- [PATCH v3 19/24] vfio/migration: Add x-migration-multifd-transfer VFIO property, Maciej S. Szmigiero, 2024/11/17
- [PATCH v3 20/24] vfio/migration: Add load_device_config_state_start trace event, Maciej S. Szmigiero, 2024/11/17
- [PATCH v3 22/24] vfio/migration: Multifd device state transfer support - receive side, Maciej S. Szmigiero, 2024/11/17
- [PATCH v3 21/24] vfio/migration: Convert bytes_transferred counter to atomic, Maciej S. Szmigiero, 2024/11/17
- [PATCH v3 23/24] migration/qemu-file: Define g_autoptr() cleanup function for QEMUFile,
Maciej S. Szmigiero <=
- [PATCH v3 24/24] vfio/migration: Multifd device state transfer support - send side, Maciej S. Szmigiero, 2024/11/17