提交 90527d2a 编写于 作者: S Stefan Weil 提交者: Michael Tokarev

kvm: Fix potential resource leak (missing fclose)

This leak was detected by cppcheck.
Signed-off-by: NStefan Weil <sw@weilnetz.de>
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
上级 7c30f657
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册