
21 Dec
2007
21 Dec
'07
4:56 p.m.
Dan Smith wrote:
KR> - type = device_type_from_poolid(poolid); KR> + type = device_type_from_str(class_base_name(CLASSNAME(ref)));
A couple things here. First, I think that we should be passing in the id, in case we need to do more specific checking in the future. We can check the classname of the ref separately.
We'll need to do the classname checking here because the bug is that you can pass a Xen_MemoryPool class with "ProcessorPool/0" as the ID, which isn't valid.
Second, class_base_name() returns a strdup()'d string, so you leak that here.
Oh yes, good catch. Thanks. =) I'll re-work this. -- Kaitlin Rupert IBM Linux Technology Center karupert@us.ibm.com