mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-06-27 12:59:30 +00:00
Fix usage of req after free
This commit is contained in:
parent
d65f32f819
commit
3b1c2f8fc4
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user