Re: [PATCH 1/2] qemu: monitor:Prevent a NULl pointer from being accessed

2020-02-12 Thread Peter Krempa
On Wed, Feb 12, 2020 at 22:09:42 +0800, Yi Wang wrote: > From: Huang Zijiang > > virJSONValueObjectGetObject maybe return NULL if the key is > missing or if value is not the correct TYPE, so we have to prevent > a NULl pointer from being accessed. If you see below we already check that the funct

[PATCH 1/2] qemu: monitor:Prevent a NULl pointer from being accessed

2020-02-12 Thread Yi Wang
From: Huang Zijiang virJSONValueObjectGetObject maybe return NULL if the key is missing or if value is not the correct TYPE, so we have to prevent a NULl pointer from being accessed. Signed-off-by: Huang Zijiang Signed-off-by: Yi Wang --- src/qemu/qemu_monitor_json.c | 89