mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-19 21:43:27 +00:00
fix(p.lua): ensure file handle is closed with zero samples
This commit is contained in:
parent
69bbf3c1b0
commit
31d7e29d73
@ -227,6 +227,7 @@ local function prof_finish()
|
|||||||
local samples = prof_samples
|
local samples = prof_samples
|
||||||
if samples == 0 then
|
if samples == 0 then
|
||||||
if prof_raw ~= true then out:write("[No samples collected]\n") end
|
if prof_raw ~= true then out:write("[No samples collected]\n") end
|
||||||
|
if out ~= stdout then out:close() end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if prof_ann then
|
if prof_ann then
|
||||||
|
Loading…
Reference in New Issue
Block a user