|Summary:||ASTERISK-07155: [patch] memset is not needed with ast_calloc|
|Reporter:||Andrey S Pankov (casper)||Labels:|
|Date Opened:||2006-06-12 17:48:26||Date Closed:||2006-06-18 16:25:05|
|Environment:||Attachments:||( 0) chan_jingle.c.r33725.diff|
( 1) chan_jingle.c.r34602.diff
|Description:||The patch is uploaded.|
|Comments:||By: Andrey S Pankov (casper) 2006-06-18 13:28:09|
ast_calloc is a wrapper to calloc and calloc stands for malloc+memset. That's
why memset is not needed here.
Patch updated - first chunk was buggy.
By: Tilghman Lesher (tilghman) 2006-06-18 13:54:26
In the first chunk, you could remove the out of memory warning.
By: Andrey S Pankov (casper) 2006-06-18 14:22:27
The problem here is that iks_new will not report OOM to asterisk log and
an extra log entry seems to be more elegant than an extra if (one with and
another without OOM reporting).
By: Russell Bryant (russell) 2006-06-18 15:52:32
fixed in the trunk in rev 34631 with some additional cleanups
By: Andrey S Pankov (casper) 2006-06-18 16:16:35
russell: why did you drop memory allocation failures with ours1 and ours2?
They need to "goto safeout;" if NULL I.M.O...
By: Russell Bryant (russell) 2006-06-18 16:25:05
oops, you're right. I was just trying to remove the duplicate error messages. I added a check for these, now. thanks