More fallout from changing to using virPolkitAgent and handling error
paths. Needed to clear the 'cmd' once stored and of course add the
virCommandFree(cmd) in the error: label.
if (VIR_ALLOC(agent) < 0)
goto error;
agent->cmd = cmd;
+ cmd = NULL;
virCommandAddArgFormat(cmd, "%lld", (long long int) getpid());
virCommandAddArg(cmd, "--notify-fd");
VIR_FORCE_CLOSE(pipe_fd[0]);
VIR_FORCE_CLOSE(pipe_fd[1]);
virPolkitAgentDestroy(agent);
+ virCommandFree(cmd);
return NULL;
}