[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Memory leak in liolib.c read_file()?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 26 Oct 2000 10:45:31 -0200
> Isn't be better to free the previously allocated buffer before calls
> lua_error()? (realloc() doesn't free the buffer if it can't allocate
> new memory, or not?)
> Sorry if I am wrong.
You are right. We will correct that. Thank you.
> Out of curiosity: why read_file() calls realloc() and read_chars
> ()/openwithcontrol() calls malloc() instead of the luaM_ versions?
Because they use only the official API, and the API does not export luaM_*.
Should it?
-- Roberto