# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1210005841 25200
# Node ID 0b51247ab15043ace24a18b6ba56a40be765fb9c
# Parent 3e785d8dbe70b756a8cb18c7ab43214d2bb4a8b3
Avoid concatenating a NULL device XML string in xmlgen
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 3e785d8dbe70 -r 0b51247ab150 libxkutil/xmlgen.c
--- a/libxkutil/xmlgen.c Fri May 02 16:32:37 2008 -0400
+++ b/libxkutil/xmlgen.c Mon May 05 09:44:01 2008 -0700
@@ -329,7 +329,8 @@ static bool concat_devxml(char **xml,
func(&_xml, &list[i]);
}
- astrcat(xml, _xml);
+ if (_xml != NULL)
+ astrcat(xml, _xml);
free(_xml);
return true;