提交 95aa1017 编写于 作者: J John Ferlan

util: Fix missing initializer for agent

In virPolkitAgentCreate neglected to initialize agent to NULL. If
there was an error in the pipe, then we jump to error and would have
an issue. Found by coverity.
上级 b3a4b176
......@@ -166,7 +166,7 @@ virPolkitAgentDestroy(virPolkitAgentPtr agent)
virPolkitAgentPtr
virPolkitAgentCreate(void)
{
virPolkitAgentPtr agent;
virPolkitAgentPtr agent = NULL;
virCommandPtr cmd = virCommandNewArgList(PKTTYAGENT, "--process", NULL);
int pipe_fd[2] = {-1, -1};
struct pollfd pollfd;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册