[Bug jit/63854] Fix memory leaks seen in JIT
dcb314 at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Dec 11 15:07:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63854
David Binderman <dcb314 at hotmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dcb314 at hotmail dot com
--- Comment #29 from David Binderman <dcb314 at hotmail dot com> ---
Similar thing in the same area, caught using static analyser cppcheck:
[gcc/jit/jit-playback.c:1791]: (error) Resource leak: f_in
Source code is
if (!feof (f_in))
{
add_error (NULL, "error reading from %s", path);
free (result);
return NULL;
}
fclose (f_in);
It looks to me like a call to fclose needs to happen just before
the return.
More information about the Gcc-bugs
mailing list