diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index d6295f32e9..7e7a21fcab 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -5977,7 +5977,7 @@ remoteDomainQemuMonitorCommandWithFiles(virDomainPtr domain, done: if (rpc_outfiles) { - for (i = 0; rpc_noutfiles < i; i++) { + for (i = 0; i < rpc_noutfiles; i++) { VIR_FORCE_CLOSE(rpc_outfiles[i]); } }