summary refs log tree commit diff stats
path: root/python/qemu/console_socket.py
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2020-10-30 16:27:42 +0100
committerMichael S. Tsirkin <mst@redhat.com>2020-11-03 07:19:27 -0500
commit8055d2fb7f4717c6aa7c4ca801a487153945a15d (patch)
treeb843c2cae2468c78e3296b1d801917a3c4583e73 /python/qemu/console_socket.py
parent8faf2f1de40e2fb919d8f584478d407a2fa7c80a (diff)
downloadfocaccia-qemu-8055d2fb7f4717c6aa7c4ca801a487153945a15d.tar.gz
focaccia-qemu-8055d2fb7f4717c6aa7c4ca801a487153945a15d.zip
hw/smbios: Fix leaked fd in save_opt_one() error path
Fix the following Coverity issue (RESOURCE_LEAK):

  CID 1432879: Resource leak

    Handle variable fd going out of scope leaks the handle.

Replace a close() call by qemu_close() since the handle is
opened with qemu_open().

Fixes: bb99f4772f5 ("hw/smbios: support loading OEM strings values from a file")
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201030152742.1553968-1-philmd@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'python/qemu/console_socket.py')
0 files changed, 0 insertions, 0 deletions