[asterisk-dev] Locking in astmm.c

Russell Bryant russell at digium.com
Tue Jan 31 15:53:19 MST 2006


Matt Roth wrote:
> Does my change look safe, or am I introducing a race condition?

I think your changes look just fine.

The only changes that I would suggest are cosmetic, for the most part.
I would remove the message to stderr, and change the text of the mmlog
message to be something more along the lines of "memory allocation
error" instead of "out of memory" since that would be more accurate.  A
NULL result from malloc indicates that there was a system error in
allocating memory.  This may be because there is none left, but we can't
assume that is the case.

Russell





More information about the asterisk-dev mailing list