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:
Michal Privoznik 2015-04-15 15:01:02 +02:00
parent 7961713410
commit 6515f3df94

View File

@ -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;