> -----Original Message----- > From: stef...@apache.org [mailto:stef...@apache.org] > Sent: maandag 16 april 2012 15:46 > To: comm...@subversion.apache.org > Subject: svn commit: r1326614 - > /subversion/trunk/subversion/libsvn_subr/svn_named_atomic.c > > Author: stefan2 > Date: Mon Apr 16 13:46:04 2012 > New Revision: 1326614 > > URL: http://svn.apache.org/viewvc?rev=1326614&view=rev > Log: > Fix error passing when the shared memory cannot be opened. > This caused uninitialized namespace objects to be used. > > * subversion/libsvn_subr/svn_named_atomic.c > (unlock): pass the outer error through if it is not NULL > > Modified: > subversion/trunk/subversion/libsvn_subr/svn_named_atomic.c > > Modified: subversion/trunk/subversion/libsvn_subr/svn_named_atomic.c > URL: > http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/svn_na > med_atomic.c?rev=1326614&r1=1326613&r2=1326614&view=diff > ================================================================= > ============= > --- subversion/trunk/subversion/libsvn_subr/svn_named_atomic.c (original) > +++ subversion/trunk/subversion/libsvn_subr/svn_named_atomic.c Mon Apr 16 > 13:46:04 2012 > @@ -282,8 +282,8 @@ lock(void) > static svn_error_t * > unlock(svn_error_t * outer_err) > { > - return svn_mutex__unlock(mutex, > - svn_io_unlock_open_file(lock_file, mutex_pool)); > + svn_error_t *unlock_err = svn_io_unlock_open_file(lock_file, mutex_pool); > + return svn_mutex__unlock(mutex, outer_err ? outer_err : unlock_err);
This potentially leaks an error. Why don't you use svn_error_compose_create()? Bert