]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Always close profiler output file.
authorMike Pall <mike>
Thu, 14 Nov 2024 16:13:58 +0000 (17:13 +0100)
committerMike Pall <mike>
Thu, 14 Nov 2024 16:13:58 +0000 (17:13 +0100)
Reported by Guilherme Batalheiro. #1304

src/jit/p.lua

index 36f836c51da632200a2e903a4c063fb3775dd3e5..ef2ee82f547f91605ca237b8e07d76d0f9a37558 100644 (file)
@@ -227,9 +227,7 @@ local function prof_finish()
     local samples = prof_samples
     if samples == 0 then
       if prof_raw ~= true then out:write("[No samples collected]\n") end
-      return
-    end
-    if prof_ann then
+    elseif prof_ann then
       prof_annotate(prof_count1, samples)
     else
       prof_top(prof_count1, prof_count2, samples, "")