projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c59748c
)
migration/qemu-file: Define g_autoptr() cleanup function for QEMUFile
author
Maciej S. Szmigiero
<maciej.szmigiero@oracle.com>
Tue, 4 Mar 2025 22:03:55 +0000
(23:03 +0100)
committer
Cédric Le Goater
<clg@redhat.com>
Thu, 6 Mar 2025 05:47:34 +0000
(06:47 +0100)
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>
migration/qemu-file.h
patch
|
blob
|
history
diff --git
a/migration/qemu-file.h
b/migration/qemu-file.h
index 3e47a20621a7e9b57822f0f8911de02dd5e63293..f5b9f430e04b1933747eba80587f9d88726c56a8 100644
(file)
--- 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:
*