mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06: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
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue