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

Re: svn commit: r1403982 - /subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Wed, 31 Oct 2012 07:08:44 +0200

breser_at_apache.org wrote on Wed, Oct 31, 2012 at 04:59:43 -0000:
> Author: breser
> Date: Wed Oct 31 04:59:42 2012
> New Revision: 1403982
>
> URL: http://svn.apache.org/viewvc?rev=1403982&view=rev
> Log:
> Fix a compile warning and a memory leak in rep_write_cleanup.
>
> * subversion/libsvn_fs_fs/fs_fs.c
> (rep_write_cleanup): txn_id shouldn't be a const and need to clear the err
> since we don't return it.
>
> Found by: danielsh
> (danielsh found the leak of the errors, I found the const)
>

I did think the lack of const on that TXN_ID parameter was funny...

> Modified:
> subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
>
> Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1403982&r1=1403981&r2=1403982&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
> +++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Wed Oct 31 04:59:42 2012
> @@ -7086,21 +7086,33 @@ static apr_status_t
> rep_write_cleanup(void *data)
> {
> struct rep_write_baton *b = data;
> - char *txn_id = svn_fs_fs__id_txn_id(b->noderev->id);
> + const char *txn_id = svn_fs_fs__id_txn_id(b->noderev->id);
> svn_error_t *err;
Received on 2012-10-31 06:09:25 CET

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