mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
kvm: Fix potential resource leak (missing fclose)
This leak was detected by cppcheck. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
7c30f65703
commit
90527d2a8b
1 changed files with 1 additions and 0 deletions
|
@ -548,6 +548,7 @@ static int get_real_id(const char *devpath, const char *idname, uint16_t *val)
|
|||
if (fscanf(f, "%li\n", &id) == 1) {
|
||||
*val = id;
|
||||
} else {
|
||||
fclose(f);
|
||||
return -1;
|
||||
}
|
||||
fclose(f);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue