Re: You don't check for malloc failure

Niv Sardi <[email protected]>
Newsgroups gmane.comp.audio.icecast.devel
Organization GZi
Message-ID <[email protected]>
Wow, I missed this patch for so long,

Thank you for the huge effort of finding all this and sending the patch.
That said, it doesn't seem like the right solution to abort() when out
of memory. what needs to be done is to return an error, and track down
the call path to handle gracefully.

in admin, return http err code,
in auth passwd, drop connection,
in auth url, drop connection,
in config probably print to stderr and abort();
in connection, drop connection,
in vorbis, close source, (that'll close clients and free a whole bunch
                          of memory)
...

that's a quick top-of-my head review, do you think you want to look a
bit deeper into that ?

Cheers,
-- 
Niv Sardi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.