[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: Brian W. Fitzpatrick <fitz_at_collab.net>
Date: 2005-01-13 21:13:30 CET

On Jan 12, 2005, at 5:19 PM, Philip Martin wrote:

> "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));

Thanks. In any case, I've rejiggered the code to have the caller close
the file descriptor, so this is now moot.

> 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.

I'll fix that. We should probably bail if anything we get from the
hash is null.

Thanks,

-Fitz

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jan 13 21:15:09 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.