mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
virPidFileConstructPath: Drop useless VIR_FREE()
If a virAsprintf() within the function fails, we call VIR_FREE() over @rundir variable and jump onto cleanup label, where it is freed again. It doesn't hurt, but not make much sense too. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
7961713410
commit
6515f3df94
@ -556,11 +556,8 @@ virPidFileConstructPath(bool privileged,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (virAsprintf(pidfile, "%s/%s.pid", rundir, progname) < 0) {
|
||||
VIR_FREE(rundir);
|
||||
if (virAsprintf(pidfile, "%s/%s.pid", rundir, progname) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user