Browse Source

Fix a memory leak in the chained read implementation

rdma-zerocopy
Vitaliy Filippov 2 months ago
parent
commit
cac976ce25
  1. 1
      src/msgr_receive.cpp
  2. 1
      tests/test_vm_cont.sh

1
src/msgr_receive.cpp

@ -332,6 +332,7 @@ bool osd_messenger_t::handle_reply_hdr(osd_client_t *cl)
cl->read_op = op;
cl->read_state = CL_READ_REPLY_DATA;
cl->read_remaining = op->reply.hdr.retval;
free(op->buf);
op->buf = memalign_or_die(MEM_ALIGNMENT, cl->read_remaining);
cl->recv_list.push_back(op->buf, cl->read_remaining);
}

1
tests/test_vm_cont.sh

@ -3,6 +3,7 @@
export KEEP_DATA=1
. `dirname $0`/common.sh
etcdctl --endpoints=http://127.0.0.1:12379/v3 del --prefix /vitastor/mon/master
etcdctl --endpoints=http://127.0.0.1:12379/v3 del --prefix /vitastor/pg/state
etcdctl --endpoints=http://127.0.0.1:12379/v3 del --prefix /vitastor/osd/state

Loading…
Cancel
Save