Fix usage of req after free

This commit is contained in:
Arnaud 2026-06-13 11:23:12 +04:00
parent d65f32f819
commit 3b1c2f8fc4
No known key found for this signature in database
GPG Key ID: A6C7C781817146FA

View File

@ -94,8 +94,9 @@ proc sendRequestToStorageThread*(
# Send the request to the Logos Storage thread
let sentOk = ctx.reqChannel.trySend(req)
if not sentOk:
let reqDesc = $req[]
deallocShared(req)
return err("Failed to send request to the Logos Storage thread: " & $req[])
return err("Failed to send request to the Logos Storage thread: " & reqDesc)
# Notify the Logos Storage thread that a request is available
let fireSyncRes = ctx.reqSignal.fireSync()