mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 20:01:16 +00:00
virTPMEmulatorInit: Don't use temporary variable to free path
Use VIR_FREE directly. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com
This commit is contained in:
parent
473c54e788
commit
c5c0dc3c81
@ -290,7 +290,6 @@ virTPMEmulatorInit(void)
|
|||||||
g_autofree char *path = NULL;
|
g_autofree char *path = NULL;
|
||||||
bool findit = *prgs[i].path == NULL;
|
bool findit = *prgs[i].path == NULL;
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
char *tmp;
|
|
||||||
|
|
||||||
if (!findit) {
|
if (!findit) {
|
||||||
/* has executables changed? */
|
/* has executables changed? */
|
||||||
@ -303,9 +302,7 @@ virTPMEmulatorInit(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (findit) {
|
if (findit) {
|
||||||
tmp = *prgs[i].path;
|
VIR_FREE(*prgs[i].path);
|
||||||
VIR_FREE(tmp);
|
|
||||||
*prgs[i].path = NULL;
|
|
||||||
|
|
||||||
path = virFindFileInPath(prgs[i].name);
|
path = virFindFileInPath(prgs[i].name);
|
||||||
if (!path) {
|
if (!path) {
|
||||||
|
Loading…
Reference in New Issue
Block a user