[PATCH] Pass a CMPIStatus parameter in connect_by_classname() in create_system()

# HG changeset patch # User Kaitlin Rupert <karupert@us.ibm.com> # Date 1250747237 25200 # Node ID 7efea1d379a1b4de6c4d7583b456a0a00f80ad3b # Parent 6fc5000bc5c33ffed10f71bf87a136da3fe2e036 Pass a CMPIStatus parameter in connect_by_classname() in create_system(). connect_by_classname() excepts a valid CMPIStatus argument since it calls CMSetStatus(), otherwise, this can lead to a seg fault. Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com> diff -r 6fc5000bc5c3 -r 7efea1d379a1 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Wed Aug 19 18:56:56 2009 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Wed Aug 19 22:47:17 2009 -0700 @@ -1403,7 +1403,7 @@ } if (domain->uuid != NULL) { - conn = connect_by_classname(_BROKER, CLASSNAME(ref), NULL); + conn = connect_by_classname(_BROKER, CLASSNAME(ref), s); if (conn == NULL) { cu_statusf(_BROKER, s, CMPI_RC_ERR_FAILED,

+1 On 08/20/2009 02:49 AM, Kaitlin Rupert wrote:
# HG changeset patch # User Kaitlin Rupert<karupert@us.ibm.com> # Date 1250747237 25200 # Node ID 7efea1d379a1b4de6c4d7583b456a0a00f80ad3b # Parent 6fc5000bc5c33ffed10f71bf87a136da3fe2e036 Pass a CMPIStatus parameter in connect_by_classname() in create_system().
connect_by_classname() excepts a valid CMPIStatus argument since it calls CMSetStatus(), otherwise, this can lead to a seg fault.
Signed-off-by: Kaitlin Rupert<karupert@us.ibm.com>
diff -r 6fc5000bc5c3 -r 7efea1d379a1 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Wed Aug 19 18:56:56 2009 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Wed Aug 19 22:47:17 2009 -0700 @@ -1403,7 +1403,7 @@ }
if (domain->uuid != NULL) { - conn = connect_by_classname(_BROKER, CLASSNAME(ref), NULL); + conn = connect_by_classname(_BROKER, CLASSNAME(ref), s); if (conn == NULL) { cu_statusf(_BROKER, s, CMPI_RC_ERR_FAILED,
_______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim
-- Richard Maciel, MSc IBM Linux Technology Center rmaciel@linux.vnet.ibm.com
participants (2)
-
Kaitlin Rupert
-
Richard Maciel