[prev in list] [next in list] [prev in thread] [next in thread] 

List:       asterisk-dev
Subject:    Re: [asterisk-dev] Locking in astmm.c
From:       Russell Bryant <russell () digium ! com>
Date:       2006-01-31 22:53:19
Message-ID: 43DFEA5F.20308 () digium ! com
[Download RAW message or body]

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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic