mirror of
https://github.com/qemu/qemu.git
synced 2025-08-17 16:03:30 +00:00
migration/qemu-file: Define g_autoptr() cleanup function for QEMUFile
Automatic memory management helps avoid memory safety issues. Reviewed-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com> Link: https://lore.kernel.org/qemu-devel/2fd01d773a783d572dcf538a064a98cc09e75c12.1741124640.git.maciej.szmigiero@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
parent
c59748c1ff
commit
fda70ed83d
@ -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:
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user