[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r27098 - trunk/subversion/libsvn_fs_fs

From: David Glasser <glasser_at_davidglasser.net>
Date: Thu, 7 Feb 2008 14:45:35 -0800

On Feb 7, 2008 2:30 PM, Eric Gillespie <epg_at_google.com> wrote:
> "David Glasser" <glasser_at_davidglasser.net> writes:
>
> > Does this fix it?
> >
> > [[[
> > Followup to r27098: fix potential segfault by using pools correctly.
> >
> > * subversion/libsvn_fs_fs/fs_fs.c
> > (svn_fs_fs__rev_get_root): Keep a string out of a pool that might
> > be cleared.
> > ]]]
>
> Looks like it, but why allocate it twice? First you changed the
> pool from which you allocate rev_str, then you pstrdup it when
> adding to the cache.

Well, unless we want to move the cache-clearing code to before we
actually know whether or not we're adding a new value, we really have
to allocate it twice, I think... am I missing an easy way out here?

--dave

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-02-07 23:45:46 CET

This is an archived mail posted to the Subversion Dev mailing list.