Re: [libvirt] [PATCH 2/3] xen: Check return value of virStringReplace

2016-02-23 Thread Ján Tomko
On Tue, Feb 23, 2016 at 09:49:08AM +0100, Michal Privoznik wrote: > 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.

[libvirt] [PATCH 2/3] xen: Check return value of virStringReplace

2016-02-23 Thread Michal Privoznik
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