From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Blandy To: Daniel Berlin Cc: Jim Blandy , Charlie Mills , gdb-patches@sourceware.cygnus.com Subject: Re: Simple but crucial bug fix to gdb Date: Fri, 01 Jun 2001 14:15:00 -0000 Message-id: References: <3.0.5.32.20010530142745.01470ec0@pophost.pdxuxbre.lmc.com> <87hexzaozu.fsf@dynamic-addr-83-177.resnet.rochester.edu> X-SW-Source: 2001-06/msg00012.html Daniel Berlin writes: > > case 'f': > > + if (! pst) > > + { > > + int name_len = p - namestring; > > + char *name = xmalloc (name_len + 1); > > + memcpy (name, namestring, name_len); > > + name[name_len] = '\0'; > > + complain (&function_outside_compilation_unit, name); > > Err, isn't this a memory leak? > > You never free the name after complaining. > > Same below Arf! Thanks!