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.
This commit is contained in:
Peter Krempa 2014-07-21 09:52:02 +02:00
parent 49a3a649a8
commit abab113bd2

View File

@ -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;