[Libvirt-cim] [PATCH 1 of 2] Fix potential crash in RAFP if a pool is not found

Dan Smith danms at us.ibm.com
Tue Mar 11 20:33:31 UTC 2008


# HG changeset patch
# User Dan Smith <danms at us.ibm.com>
# Date 1205267321 25200
# Node ID eba6a48fcf9a1cec9c5e21e6c06984a3b1716803
# Parent  b739fc9b13320e07a39f3932396c8411c2d4ad75
Fix potential crash in RAFP if a pool is not found

Signed-off-by: Dan Smith <danms at us.ibm.com>

diff -r b739fc9b1332 -r eba6a48fcf9a src/Virt_ResourceAllocationFromPool.c
--- a/src/Virt_ResourceAllocationFromPool.c	Tue Mar 11 13:28:04 2008 -0700
+++ b/src/Virt_ResourceAllocationFromPool.c	Tue Mar 11 13:28:41 2008 -0700
@@ -116,7 +116,7 @@ static int filter_by_pool(struct inst_li
                 cu_get_str_prop(inst, "InstanceID", &rasd_id);
 
                 poolid = pool_member_of(_BROKER, CLASSNAME(op), type, rasd_id);
-                if (STREQ(poolid, _poolid))
+                if ((poolid != NULL) && STREQ(poolid, _poolid))
                         inst_list_add(dest, inst);
         }
 




More information about the Libvirt-cim mailing list