提交 abab113b 编写于 作者: P Peter Krempa

examples: domtop: Fix uninitialized variable use

max_id could be used uninitialized in the cleanup section after the
domain wasn't found.

Discovered by Coverity.
上级 49a3a649
......@@ -254,7 +254,7 @@ do_top(virConnectPtr conn,
{
int ret = -1;
virDomainPtr dom;
int max_id;
int max_id = 0;
int nparams = 0, then_nparams = 0, now_nparams = 0;
virTypedParameterPtr then_params = NULL, now_params = NULL;
struct sigaction action_stop;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册