]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
kvm tools: Fix a possible segfault if raw_image__probe returns NULL
authorPrasad Joshi <prasadjoshi124@gmail.com>
Fri, 8 Apr 2011 18:29:15 +0000 (19:29 +0100)
committerPekka Enberg <penberg@kernel.org>
Fri, 8 Apr 2011 18:32:01 +0000 (21:32 +0300)
commitab89f1c26ff11fb3cc0065d3ad6f4cf89915c55d
tree89e0d96a6318c6c9f9a493677d6f8e90ad5e269a
parent9b47b4b9684a5afeca7bdbd75ae3f8d8e64f4a47
kvm tools: Fix a possible segfault if raw_image__probe returns NULL

raw_image__probe() might return NULL therefore, using self->fd will segment.
Instead use the local fd variable to close the file.

Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/disk-image.c