[Home]

Summary:ASTERISK-11007: [patch] On error free memory used in ast_el_strtoarr() and complete the /*TODO*/
Reporter:Eliel Sardanons (eliel)Labels:
Date Opened:2007-12-10 21:38:54.000-0600Date Closed:2007-12-12 11:15:45.000-0600
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk.c.patch
Description:Please see that I add a new variable '_tmp', because if we assign the result of the realloc() to the original pointer, we are loosing the reference and realloc on error doesn't touch the original allocated memory (so we need to free it).
Comments:By: Digium Subversion (svnbot) 2007-12-12 11:15:45.000-0600

Repository: asterisk
Revision: 92507

U   trunk/main/asterisk.c

------------------------------------------------------------------------
r92507 | tilghman | 2007-12-12 11:15:44 -0600 (Wed, 12 Dec 2007) | 5 lines

Correctly handle possible memory allocation failure
Reported by: eliel
Patch by: eliel
(Closes issue ASTERISK-11007)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=92507