
δΊ 2013-8-20 14:44, Viktor Mihajlovski ει:
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
On 08/20/2013 03:56 AM, Wenchao Xia wrote: [...] 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. -- Best Regards Wenchao Xia