assaultcube / AC

AssaultCube
820 stars 212 forks source link

few memory issue fixes proposal. #449

Open devnexen opened 2 years ago

devnexen commented 2 years ago

wrong delete operator kind and leak.

flowtron commented 2 years ago

The change in protocol.cpp is consistent with other char* by newstring(?) being deleted (serverbrowser,menus) although some people argue the compiler would handle this intelligently for trivial deconstructors. Speaking of deconstructors - the one for voteinfo takes care of deleting the action so your fix isn't actually needed. Could you please also change the spacing to match up with (original) Cube1 coding style - so that should be "delete[] buf". Thanks!!