tests: vir: use g_autofree

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
Ján Tomko
2021-09-04 22:37:31 +02:00
parent 5679b6283b
commit 526551ac0a
24 changed files with 65 additions and 140 deletions

View File

@@ -210,7 +210,7 @@ testISCSIGetSession(const void *data)
{
const struct testSessionInfo *info = data;
struct testIscsiadmCbData cbData = { 0 };
char *actual_session = NULL;
g_autofree char *actual_session = NULL;
int ret = -1;
g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew();
@@ -231,7 +231,6 @@ testISCSIGetSession(const void *data)
ret = 0;
cleanup:
VIR_FREE(actual_session);
return ret;
}