mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
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.
This commit is contained in:
parent
b3a4b176f0
commit
95aa101795
@ -166,7 +166,7 @@ virPolkitAgentDestroy(virPolkitAgentPtr agent)
|
|||||||
virPolkitAgentPtr
|
virPolkitAgentPtr
|
||||||
virPolkitAgentCreate(void)
|
virPolkitAgentCreate(void)
|
||||||
{
|
{
|
||||||
virPolkitAgentPtr agent;
|
virPolkitAgentPtr agent = NULL;
|
||||||
virCommandPtr cmd = virCommandNewArgList(PKTTYAGENT, "--process", NULL);
|
virCommandPtr cmd = virCommandNewArgList(PKTTYAGENT, "--process", NULL);
|
||||||
int pipe_fd[2] = {-1, -1};
|
int pipe_fd[2] = {-1, -1};
|
||||||
struct pollfd pollfd;
|
struct pollfd pollfd;
|
||||||
|
Loading…
Reference in New Issue
Block a user