mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
vsh: use g_clear_pointer
Replace remaining uses of VIR_FREE with g_clear_pointer. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
4d64c850c4
commit
a6488fd3a2
@ -2253,10 +2253,7 @@ vshCloseLogFile(vshControl *ctl)
|
||||
g_strerror(errno));
|
||||
}
|
||||
|
||||
if (ctl->logfile) {
|
||||
VIR_FREE(ctl->logfile);
|
||||
ctl->logfile = NULL;
|
||||
}
|
||||
g_clear_pointer(&ctl->logfile, g_free);
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
@ -2852,8 +2849,8 @@ vshReadlineDeinit(vshControl *ctl)
|
||||
}
|
||||
}
|
||||
|
||||
VIR_FREE(ctl->historydir);
|
||||
VIR_FREE(ctl->historyfile);
|
||||
g_clear_pointer(&ctl->historydir, g_free);
|
||||
g_clear_pointer(&ctl->historyfile, g_free);
|
||||
}
|
||||
|
||||
char *
|
||||
|
Loading…
Reference in New Issue
Block a user