This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: readelf.c (process_version_sections): Free memory returned by get_data.


Michael Snyder <msnyder@vmware.com> writes:
> @@ -8201,8 +8206,10 @@ process_version_sections (FILE * file)
>  
>  			  do
>  			    {
> -			      get_data (&evd, file, offset, sizeof (evd), 1,
> -					_("version def"));
> +			      tmp = get_data (&evd, file, offset,
> +					      sizeof (evd), 1,
> +					      _("version def"));
> +			      free (tmp);
>  
>  			      ivd.vd_next = BYTE_GET (evd.vd_next);
>  			      ivd.vd_ndx  = BYTE_GET (evd.vd_ndx);

This doesn't look right.  get_data returns &evd in this case,
doesn't it?

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]