Re: [PATCH] Fix symlink resolution (yet again!)



Am Montag, den 17.10.2005, 15:47 +0200 schrieb Alexander Larsson:
> On Mon, 2005-10-10 at 21:43 +0200, Christian Neumair wrote:
> > It turns out that _gnome_vfs_uri_resolve_all_symlinks_uri used to unref
> > an URI before accessing its uri->text. This is bad of course if its
> > refcount is 1.
> > 
> > Proposed patch attached, which fixes bug 318457 [1].
> > 
> > We could have saved the new_uri unref/ref if we introduced an additional
> > variable instead of using the (later unrefed) new_uri. However, 3 local
> > URI variables in this function are definitly confusing enough.
> 
> I actually think the mixed use of new_uri is more confusing than clean
> use of a new variable. To understand the use of a new variable you only
> have to understand a small part of the code, however the re-using of
> new_uri makes the lifetime of that variable much more complicated.
> 
> However, it matters little. Both ways work, so please commit on HEAD and
> on the branch.

Done.

-- 
Christian Neumair <chris gnome-de org>

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]