Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0195744 authored by Josh Gao's avatar Josh Gao
Browse files

adb: fix uninitialized variable.

Previously, we were initializing IoBlock::pending when submitting a read,
but leaving it uninitialized when doing a write, which would sometimes
result in an assertion firing when we received a previously allocated
block of memory that happened to have a nonzero value in pending.

Test: treehugger
Change-Id: I434c65f554ceed313fea9cfcc98788908f3ca8bc
parent eecd5cc5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ struct TransferId {
};

struct IoBlock {
    bool pending;
    bool pending = false;
    struct iocb control;
    std::shared_ptr<Block> payload;