Fix memory leak (RGBController::GetDeviceDescription)
This commit is contained in:
parent
e848be5159
commit
8ef9f622f1
2 changed files with 4 additions and 0 deletions
|
|
@ -833,6 +833,8 @@ void NetworkServer::SendReply_ControllerData(SOCKET client_sock, unsigned int de
|
|||
|
||||
send(client_sock, (const char *)&reply_hdr, sizeof(NetPacketHeader), 0);
|
||||
send(client_sock, (const char *)reply_data, reply_size, 0);
|
||||
|
||||
delete reply_data;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,6 +75,8 @@ bool ProfileManager::SaveProfile(std::string profile_name, bool sizes)
|
|||
memcpy(&controller_size, controller_data, sizeof(controller_size));
|
||||
|
||||
controller_file.write((const char *)controller_data, controller_size);
|
||||
|
||||
delete controller_data;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue