This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Free memory used by optimization/target options
- From: Martin Liška <mliska at suse dot cz>
- To: Jan Hubicka <hubicka at ucw dot cz>, gcc-patches at gcc dot gnu dot org, rguenther at suse dot de
- Date: Wed, 6 Nov 2019 10:22:33 +0100
- Subject: Re: Free memory used by optimization/target options
- References: <20191105104043.ivy62bbgp7776uoy@kam.mff.cuni.cz>
On 11/5/19 11:40 AM, Jan Hubicka wrote:
+ print " if (ptr->" name")";
+ print " free (const_cast <char *>(ptr->" name"));";
If I'm correct, you can call free even for a NULL pointer.
Martin