mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
lib: Prefer g_autoptr() declaration of virQEMUDriverConfigPtr
In the past we had to declare @cfg and then explicitly unref it. But now, with glib we can use g_autoptr() which will do the unref automatically and thus is more bulletproof. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
@@ -132,7 +132,7 @@ mymain(void)
|
||||
{
|
||||
int ret = 0;
|
||||
g_autofree char *fakerootdir = NULL;
|
||||
virQEMUDriverConfigPtr cfg = NULL;
|
||||
g_autoptr(virQEMUDriverConfig) cfg = NULL;
|
||||
g_autoptr(virHashTable) capslatest = NULL;
|
||||
g_autoptr(virConnect) conn = NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user