Re:The Two Factions of C++
by drivebyhooting on Tuesday November 26, 2024 @12:43AM
(#42242896)
Why is that a safety issue?
[ Parent
| on HN ]
Re:The Two Factions of C++
by AlotOfReading on Tuesday November 26, 2024 @01:45AM
(#42243067)
Malloc/Calloc can fail even if they typically don't on most Linux systems. You should always check for null pointers before accessing the resulting buffer, which doesn't happen here. The connections() block is also never explicitly freed anywhere I was able to find in a quick search. That's allowed, but definitely bad practice.