[Asterisk-Dev] Memory leak in ast_expr.y

Kevin P. Fleming kpfleming at starnetworks.us
Tue Dec 7 12:15:58 MST 2004


Claude Klimos wrote:

> 218,220d217
> <
> < if (vp)
> < free (vp);

Your patch is backwards, it shows deleting these two lines, when 
actually you are adding them.

It's not necessary to check if vp is non-NULL, because the code a couple 
of lines above has already done that.

I can't say for sure that freeing the val structure here is correct, but 
it does appear to be the right thing to do.

You should post a bug in bugs.digium.com, with the correctly-formatted 
patch, to get it fixed in the tree.



More information about the asterisk-dev mailing list