提交 6515f3df 编写于 作者: M Michal Privoznik

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: NMichal Privoznik <mprivozn@redhat.com>
上级 79617134
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册