• Xin Zhao's avatar
    Bug-fix: avoid free NULL pointer in RMA. · 72a1e6f8
    Xin Zhao authored
    req->dev.user_buf points to the data sent from origin process
    to target process, and for FOP sometimes it points to the IMMED
    area in packet header when data can be fit in packet header.
    In such case, we should not free req->dev.user_buf in final
    request handler since that data area will be freed by the
    runtime when packet header is freed.
    In this patch we initialize user_buf to NULL when creating the
    request, and set it to NULL when FOP is completed, and avoid free
    a NULL pointer in final request handler.
    Signed-off-by: default avatarMin Si <msi@il.is.s.u-tokyo.ac.jp>