Re: [Qemu-devel] [PATCH qemu v3 1/2] object: Handle objects with no parents

2018-05-30 Thread Paolo Bonzini
On 30/05/2018 09:17, Alexey Kardashevskiy wrote: > At the moment object_get_canonical_path() crashes if the object or one > of its parents does not have a parent, for example, a KVM accelerator > object. > > This adds a check for obj!=NULL in a loop to prevent the crash. > In order not to return a

[Qemu-devel] [PATCH qemu v3 1/2] object: Handle objects with no parents

2018-05-30 Thread Alexey Kardashevskiy
At the moment object_get_canonical_path() crashes if the object or one of its parents does not have a parent, for example, a KVM accelerator object. This adds a check for obj!=NULL in a loop to prevent the crash. In order not to return a wrong path, this checks for currently resolved partial path