]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
remote: close outfiles faster
authorJán Tomko <jtomko@redhat.com>
Thu, 3 Mar 2022 13:01:16 +0000 (14:01 +0100)
committerJán Tomko <jtomko@redhat.com>
Fri, 4 Mar 2022 13:14:39 +0000 (14:14 +0100)
Switch the operands in the loop condition to make it converge.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/remote/remote_driver.c

index d6295f32e9fab16b1e3ff60d87dad1f5e4c63c31..7e7a21fcab7776d81180ddefd75b19ea3c94a0af 100644 (file)
@@ -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]);
         }
     }