Fix use-after-free: delete temp file before freeing path memory
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -99,8 +99,8 @@ fn handleTranscription(
|
||||
var audio_path = tmp_input;
|
||||
var tmp_audio: ?[]u8 = null;
|
||||
defer if (tmp_audio) |p| {
|
||||
allocator.free(p);
|
||||
std.fs.deleteFileAbsolute(p) catch {};
|
||||
allocator.free(p);
|
||||
};
|
||||
|
||||
if (is_video) {
|
||||
|
||||
Reference in New Issue
Block a user