On Mon, 2007-07-02 at 18:46 -0500, Ben Combee wrote: > This one's in shell.c. In process_input(), zLine is assigned using > > zLine = one_input_line(zSql, in); > > Usually, you hit the free(zLine) call in one of the code paths before > repeating the while loop. However, on line 1614 > > if( (zSql==0 || zSql[0]==0) && _all_whitespace(zLine) ) continue; > > you can continue to the top of the while loop without freeing zLine, > resulting in a leak when the next line of input is read. > > It also looks like you can lose the memory attached to zLine if you > hit line 1609's if statement > > if( in!=0 ) break; > > and break out of the while loop.
I think you're right. I made some minor changes: http://www.sqlite.org/cvstrac/chngview?cn=4153 See what you think now: http://www.sqlite.org/cvstrac/fileview?f=sqlite/src/shell.c&v=1.164 Dan. > ----------------------------------------------------------------------------- > To unsubscribe, send email to [EMAIL PROTECTED] > ----------------------------------------------------------------------------- > ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------