Fixes a few memory leaks
This commit is contained in:
parent
8bb7ab8099
commit
70b2a9c842
2 changed files with 6 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue