Issue: 995322
Change-Id: Iccffbd0defd09aa51c4b51b78733921444ea1c5f
Signed-off-by: Amir Vadai <amir@vadai.me>
#endif
}
+Port::~Port()
+{
+ delete port_attr;
+}
+
Device::Device(CephContext *cct, Infiniband *ib, ibv_device* d)
: cct(cct), device(d), lock("ibdev_lock"),
Device::~Device()
{
+ delete async_handler;
+
uninit();
if (active_port) {
delete active_port;
assert(ibv_close_device(ctxt) == 0);
}
+
+ delete device_attr;
}
void Device::binding_port(CephContext *cct, int port_num) {
DeviceList::~DeviceList()
{
- delete poll_fds;
+ delete[] poll_fds;
for (int i=0; i < num; ++i) {
delete devices[i];
int port_num;
struct ibv_port_attr* port_attr;
uint16_t lid;
- int gid_idx;
+ int gid_idx = 0;
union ibv_gid gid;
public:
explicit Port(CephContext *cct, struct ibv_context* ictxt, uint8_t ipn);
+ ~Port();
uint16_t get_lid() { return lid; }
ibv_gid get_gid() { return gid; }
int get_port_num() { return port_num; }