提交 ee70fe7e 编写于 作者: M Michal Privoznik

virTestSetEnvPath: Avoid clearing out PATH

If the abs_builddir path already is in PATH and it's in the first
position, due to a bug in our code PATH would be cleared out.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 d715bfac
......@@ -822,7 +822,8 @@ virTestSetEnvPath(void)
goto cleanup;
}
if (setenv("PATH", new_path, 1) < 0)
if (new_path &&
setenv("PATH", new_path, 1) < 0)
goto cleanup;
ret = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册