cvs commit: src/sys/netinet sctp_input.c

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Thu Aug 11 04:04:28 PDT 2005


On 11.08.2005, at 07:52, Joerg Sonnenberger wrote:
  Log:
  Test for malloc returning NULL.
  Not sure if doing nothing is the best solution.
It certainly isn't. Please don't arbitrarily chance code after mallocs
to short circuit or not panic, unless you really understand the code.
I'm pretty sure that this is wrong.
This code should use M_INTWAIT and not M_NOWAIT, just like the other
examples.
This function is being called from sctp_input() with a critical section 
held, so I doubt you are right.  Common code I saw always uses M_NOWAIT 
and treats NULL as a failure.

--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low $$$ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \
Attachment:
PGP.sig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00010.pgp
Type: application/octet-stream
Size: 186 bytes
Desc: "Description: This is a digitally signed message part"
URL: <http://lists.dragonflybsd.org/pipermail/commits/attachments/20050811/f604084f/attachment-0018.obj>


More information about the Commits mailing list