Home
last modified time | relevance | path

Searched hist:"8055 d2fb" (Results 1 – 1 of 1) sorted by relevance

/openbmc/qemu/hw/smbios/
H A Dsmbios.c8055d2fb Fri Oct 30 10:27:42 CDT 2020 Philippe Mathieu-Daudé <philmd@redhat.com> 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>