On Wed, Oct 22, 2014 at 10:15:57AM -0500, Jeremy White wrote: > On 10/22/2014 09:38 AM, Christophe Fergeau wrote: > >Hey, > > > >There are a bunch of calloc/malloc throughout the patch with no check > >for a NULL return, would be nice to add that. > > Hmm. I've seen this argued both ways. One side argues that if an > allocation is never expected to fail, that it's best to just trigger the > resulting crash as a diagnostic. Trying to 'handle' an error where there is > no reasonable response can just mask the problem, or so goes the rationale. > And these are all small allocs that really should never fail. > > The code base is unclear; it seems that allocs are sometimes checked, and > sometimes not. It's easy to add; if you feel it's the preferred Spice > standard, I'll add the checks. Ah, I lean towards the "don't handle", but the few other allocs I looked at were checking, hence the comment. If other allocs are unchecked, feel free to keep things this way. Christophe
Attachment:
pgpKCQrURDwcE.pgp
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel