]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix segfault with console device back compat.
authorCole Robinson <crobinso@redhat.com>
Fri, 16 Jan 2009 16:50:11 +0000 (16:50 +0000)
committerCole Robinson <crobinso@redhat.com>
Fri, 16 Jan 2009 16:50:11 +0000 (16:50 +0000)
ChangeLog
src/domain_conf.c

index d2f467b989e6cd08a6c749ec79f8fa7a2d2ec82d..7655836d7b1cf5b2ea8b049e203c19fe4bedd186 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Jan 16 11:48:41 EST 2009 Cole Robinson <crobinso@redhat.com>
+
+       * src/domain_conf.c: Fix segfault with console device back compat.
+
 Thu Jan 15 20:12:19 GMT 2009  Daniel P. Berrange <berrange@redhat.com>
 
        * src/remote_internal.c: Fix bug when fork isn't available (Win32)
index 4250d81c764f2dd6ebea61e96f66da7560f4383f..94196e83f78d198e72e7f993a2bc0a7bdd0da21c 100644 (file)
@@ -3328,8 +3328,9 @@ char *virDomainDefFormat(virConnectPtr conn,
         if (virDomainChrDefFormat(conn, &buf, def->console, "console") < 0)
             goto cleanup;
     } else if (def->nserials != 0) {
-        /* ..else for legacy compat duplicate the serial device as a console */
-        if (virDomainChrDefFormat(conn, &buf, def->serials[n], "console") < 0)
+        /* ..else for legacy compat duplicate the first serial device as a
+         * console */
+        if (virDomainChrDefFormat(conn, &buf, def->serials[0], "console") < 0)
             goto cleanup;
     }