Re: [libvirt] [PATCH 2/2] esx_vi: fix possible segfault

2015-01-22 Thread Pavel Hrdina
On 01/21/2015 06:47 PM, Peter Krempa wrote: On Wed, Jan 21, 2015 at 18:09:28 +0100, Pavel Hrdina wrote: Clang found possible dereference of NULL pointer which is right. Function 'esxVI_LookupTaskInfoByTask' should find a task info. The issue is that we could return 0 and leave 'taksInfo'

Re: [libvirt] [PATCH 2/2] esx_vi: fix possible segfault

2015-01-21 Thread Peter Krempa
On Wed, Jan 21, 2015 at 18:09:28 +0100, Pavel Hrdina wrote: Clang found possible dereference of NULL pointer which is right. Function 'esxVI_LookupTaskInfoByTask' should find a task info. The issue is that we could return 0 and leave 'taksInfo' pointer NULL because if there is no match we

[libvirt] [PATCH 2/2] esx_vi: fix possible segfault

2015-01-21 Thread Pavel Hrdina
Clang found possible dereference of NULL pointer which is right. Function 'esxVI_LookupTaskInfoByTask' should find a task info. The issue is that we could return 0 and leave 'taksInfo' pointer NULL because if there is no match we simply end the search loop end set 'result' to 0. Every caller count