Browse Source

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>
pull/291/head
Maciej S. Szmigiero 1 year ago
committed by Cédric Le Goater
parent
commit
fda70ed83d
  1. 2
      migration/qemu-file.h

2
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:
*

Loading…
Cancel
Save