[Libvirt-cim] [PATCH V3] Add dumpCore tag support to memory

Wenchao Xia xiawenc at linux.vnet.ibm.com
Fri Aug 23 02:55:52 UTC 2013


于 2013-8-20 19:06, Wenchao Xia 写道:
> 于 2013-8-20 14:44, Viktor Mihajlovski 写道:
>> On 08/20/2013 03:56 AM, Wenchao Xia wrote:
>> [...]
>>>> diff --git a/libxkutil/xmlgen.c b/libxkutil/xmlgen.c
>>>> index 4287d42..30e9a5e 100644
>>>> --- a/libxkutil/xmlgen.c
>>>> +++ b/libxkutil/xmlgen.c
>>>> @@ -498,6 +498,15 @@ static const char *mem_xml(xmlNodePtr root,
>>>> struct domain *dominfo)
>>>>                             BAD_CAST string);
>>>>
>>>>           free(string);
>>>> +
>>>> +        if (tmp == NULL)
>>>> +                return XML_ERROR;
>>>    No checking with tmp is a bugfix, so better to fix it in another
>>> patch.
>> actually, this *is* related to the patch changes, because before the
>> patch, tmp == NULL was handled in the out: section, without this
>> check we would run into a problem doing the xmlNewProp calls.
>> So you should keep this as is.
>> BTW: the result of xmlNewProp isn't checked, but then the libxkutil code
>> doesn't seem to be consistent in this matter...
>>
>     You are right, I missed there are following lines, this check make
> sure no new bug introduced.
>
Hi, John
   The code of this patch seems OK to me, do you have a time to review
it? If you found no new issue, can you push this patch upstream?

-- 
Best Regards

Wenchao Xia




More information about the Libvirt-cim mailing list