This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: readelf.c (process_version_sections): Free memory returned by get_data.
- From: Richard Sandiford <richard dot sandiford at linaro dot org>
- To: Michael Snyder <msnyder at vmware dot com>
- Cc: "binutils\ at sourceware dot org" <binutils at sourceware dot org>
- Date: Mon, 14 Mar 2011 12:14:32 +0000
- Subject: Re: readelf.c (process_version_sections): Free memory returned by get_data.
- References: <4D758036.2030504@vmware.com>
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