render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
Blob Blame History Raw
diff -rup libvirt-0.4.0.orig/src/remote_internal.c libvirt-0.4.0.new/src/remote_internal.c
--- libvirt-0.4.0.orig/src/remote_internal.c	2008-01-14 19:32:25.000000000 -0500
+++ libvirt-0.4.0.new/src/remote_internal.c	2008-01-14 19:32:42.000000000 -0500
@@ -677,11 +677,12 @@ doRemoteOpen (virConnectPtr conn,
         cmd_argv[j++] = strdup (sockname ? sockname : LIBVIRTD_PRIV_UNIX_SOCKET);
         cmd_argv[j++] = 0;
         assert (j == nr_args);
-        for (j = 0; j < nr_args; j++)
+        for (j = 0; j < (nr_args-1); j++) {
             if (cmd_argv[j] == NULL) {
                 error (conn, VIR_ERR_SYSTEM_ERROR, strerror (ENOMEM));
                 goto failed;
             }
+        }
     }
 
         /*FALLTHROUGH*/