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

Re: svn commit: r12683 - branches/locking/subversion/libsvn_fs_fs

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-01-13 00:19:15 CET

"Brian W. Fitzpatrick" <fitz@collab.net> writes:

>> > + if (err)
>> > + {
>> > + SVN_ERR (svn_io_file_close (fd, pool));
>>
>> If svn_io_file_close fails then err leaks.
>
> So just call svn_error_clear before svn_io_file_close?

No, because if svn_io_file_close doesn't fail then err is returned.
Use
     svn_error_clear (svn_io_file_close (fd, pool));

While you are here, there is a bug in read_lock_from_abs_path(). It
does

  lock = apr_palloc (pool, sizeof (*lock));

  val = hash_fetch (hash, PATH_KEY, pool);
  if (val)
    lock->path = val;

and if val == NULL lock->path is unitialised. The same problem
affects the other lock members as well.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jan 13 00:20:36 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.