Fix mismatched new[] / delete
- The device description buffer was allocated using new[] in RGBController. Make sure to free it using delete[].
This commit is contained in:
parent
198a246af1
commit
30f88d5fcf
2 changed files with 2 additions and 2 deletions
|
|
@ -834,7 +834,7 @@ 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;
|
||||
delete[] reply_data;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ bool ProfileManager::SaveProfile(std::string profile_name, bool sizes)
|
|||
|
||||
controller_file.write((const char *)controller_data, controller_size);
|
||||
|
||||
delete controller_data;
|
||||
delete[] controller_data;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue