]> Git Repo - qemu.git/commit
virtio pmem: remove memdev null check
authorPankaj Gupta <[email protected]>
Fri, 12 Jul 2019 07:35:53 +0000 (13:05 +0530)
committerMichael S. Tsirkin <[email protected]>
Fri, 12 Jul 2019 14:56:27 +0000 (10:56 -0400)
commit7b8a8474249eec97cd6a82f78b91183626fda65b
tree675b6afd6580b7b50454bff170a296ca234009ba
parentf37f47126236c8dc710d97da8ca9d43c38bef4ec
virtio pmem: remove memdev null check

Coverity reports that when we're assigning vi->size we handle the
"pmem->memdev is NULL" case; but we then pass it into
object_get_canonical_path(), which unconditionally dereferences it
and will crash if it is NULL. If this pointer can be NULL then we
need to do something else here.

We are removing 'pmem->memdev' null check here as memdev will never
be null in this function.

Signed-off-by: Pankaj Gupta <[email protected]>
Message-Id: <20190712073554[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Cornelia Huck <[email protected]>
hw/virtio/virtio-pmem.c
This page took 0.025364 seconds and 4 git commands to generate.