This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Free cache in sysdeps/unix/sysv/linux/check_pf.c
On Monday, May 14, 2012 04:05:27 H.J. Lu wrote:
> On Sat, May 12, 2012 at 09:28:27AM -0700, H.J. Lu wrote:
> > Hi,
> >
> > "make xcheck" reports:
> >
> > [hjl@gnu-6 build-x86_64-linux]$ cat posix/bug-ga2-mem
> >
> > Memory not freed:
> > -----------------
> >
> > Address Size Caller
> >
> > 0x00005555557791e0 0x78 at 0x7ffff7d5d989
> > [hjl@gnu-6 build-x86_64-linux]$
> >
> > We didn't free cache in sysdeps/unix/sysv/linux/check_pf.c. This
> > patch fixes it. OK to install?
> >
> > Thanks.
>
> Thanks to Ulrich's pointer. Here is the proper fix. Tested on
> Linux/x86-64. OK to install?
This is fine, thanks!
Andreas
> Thanks.
>
>
> H.J.
> ---
> 2012-05-13 H.J. Lu <hongjiu.lu@intel.com>
>
> [BZ #14104]
> * sysdeps/unix/sysv/linux/check_pf.c (cache): Use
> libc_freeres_ptr.
>
> diff --git a/sysdeps/unix/sysv/linux/check_pf.c
> b/sysdeps/unix/sysv/linux/check_pf.c index 7d83906..793d27d 100644
> --- a/sysdeps/unix/sysv/linux/check_pf.c
> +++ b/sysdeps/unix/sysv/linux/check_pf.c
> @@ -61,7 +61,7 @@ static struct cached_data noai6ai_cached =
> .in6ailen = 0
> };
>
> -static struct cached_data *cache;
> +libc_freeres_ptr (static struct cached_data *cache);
> __libc_lock_define_initialized (static, lock);
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126