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...
--
Mit freundlichen Grüßen/Kind Regards
Viktor Mihajlovski
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martina Köderitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294