render / rpms / libvirt

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