]> xenbits.xensource.com Git - libvirt.git/commit
xen: Check return value of virStringReplace
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 23 Feb 2016 08:34:49 +0000 (09:34 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 23 Feb 2016 14:46:19 +0000 (15:46 +0100)
commite0392f5a747dc771808086a3cc0f940b9287eaf5
tree1bfe94cd38c3298481d5aa6dbfdf0719412f0bd3
parenta0e5faaf66a185966ea8656799ead4703675a233
xen: Check return value of virStringReplace

After 6604a3dd9f8 in which new helper function has been
introduced, the code calls virStringReplace and dereference the
result immediately. The string function can, however, return NULL
so this would SIGSEGV right away. Check for the return value of
the string function.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/xenconfig/xen_xl.c