This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [gfortran] Patch to implement getenv g77 and get_environment_variable F2003 intrinsics
- From: Richard Henderson <rth at redhat dot com>
- To: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sat, 17 Jul 2004 12:07:54 -0700
- Subject: Re: [gfortran] Patch to implement getenv g77 and get_environment_variable F2003 intrinsics
- References: <20040717115429.GA11070@vipunen.hut.fi>
On Sat, Jul 17, 2004 at 02:54:29PM +0300, Janne Blomqvist wrote:
> res = getenv(name_nt);
...
> free(res);
RETURN VALUE
The getenv() function returns a pointer to the value in the environ-
ment, or NULL if there is no match.
I.e. you're freeing a pointer that wasn't malloced.
r~