mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-04-29 02:04:13 -04:00
Fixes a few memory leaks
This commit is contained in:
@@ -141,6 +141,8 @@ void CorsairCommanderCoreController::SendMultiPkt(unsigned char buffarray[][5],
|
||||
hid_write(dev, hidtemp, CORSAIR_COMMANDER_CORE_PACKET_SIZE);
|
||||
hid_read(dev, hidtemp, CORSAIR_COMMANDER_CORE_PACKET_SIZE);
|
||||
}
|
||||
|
||||
delete[] hidtemp;
|
||||
}
|
||||
|
||||
void CorsairCommanderCoreController::SetDirectColor
|
||||
@@ -211,6 +213,8 @@ void CorsairCommanderCoreController::SetDirectColor
|
||||
last_commit_time = std::chrono::steady_clock::now();
|
||||
|
||||
hid_write(dev, usb_buf, CORSAIR_COMMANDER_CORE_PACKET_SIZE);
|
||||
|
||||
delete[] usb_buf;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@ void ENESMBusController::SetAllColorsDirect(RGBColor* colors)
|
||||
bytes_sent += bytes_to_send;
|
||||
}
|
||||
|
||||
delete color_buf;
|
||||
delete[] color_buf;
|
||||
}
|
||||
|
||||
void ENESMBusController::SetAllColorsEffect(RGBColor* colors)
|
||||
@@ -316,7 +316,7 @@ void ENESMBusController::SetAllColorsEffect(RGBColor* colors)
|
||||
|
||||
ENERegisterWrite(ENE_REG_APPLY, ENE_APPLY_VAL);
|
||||
|
||||
delete color_buf;
|
||||
delete[] color_buf;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user