[Libvirt-cim] [PATCH] Fix crash in KVMRedirecitonSAP

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Tue Nov 18 17:29:01 UTC 2008


# HG changeset patch
# User kaitlin at elm3b43.beaverton.ibm.com
# Date 1227029825 28800
# Node ID 3ba5b590ba76a39c720bafaa103d04c9af10299f
# Parent  6dced559882a0b792d2e31b45faae566b2dbfe38
Fix crash in KVMRedirecitonSAP.

Make sure the char * in the vnc_ports struct is properly initialized.

Also remove an unnecessary blank line.

diff -r 6dced559882a -r 3ba5b590ba76 src/Virt_KVMRedirectionSAP.c
--- a/src/Virt_KVMRedirectionSAP.c	Tue Nov 11 10:22:57 2008 -0800
+++ b/src/Virt_KVMRedirectionSAP.c	Tue Nov 18 09:37:05 2008 -0800
@@ -276,7 +276,6 @@
                            CMPI_RC_ERR_FAILED,
                            "Unable to allocate guest port list");
                 goto out;
-
         }
 
         for (i = 0; i < count; i++) {
@@ -287,6 +286,7 @@
                                    "Unable to allocate guest port list");
                         goto out;
                 }
+                port_list.list[i]->name = NULL;
         }
 
         for (i = 0; i < count; i++) {




More information about the Libvirt-cim mailing list