On a slightly different note I noticed this oddity in lib_fs_fs/dag.c from
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/dag.c?annotate=1517479

703jpieper849539<http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/dag.c?r1=849538&r2=849539&;>if
(is_parent_copyroot)
704jpieper849532<http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/dag.c?r1=849531&r2=849532&;>{
705danielsh1305396<http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/dag.c?r1=1305395&r2=1305396&;>SVN_ERR(get_node_revision(&parent_noderev,
parent));
706jpieper849539<http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/dag.c?r1=849538&r2=849539&;>noderev->copyroot_rev
= parent_noderev->copyroot_rev;
707kfogel858545<http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/dag.c?r1=858544&r2=858545&;>noderev->copyroot_path
= apr_pstrdup(pool,
708   
parent_noderev->copyroot_path);709jpieper849532<http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/dag.c?r1=849531&r2=849532&;>}
710hwright866391<http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/dag.c?r1=866390&r2=866391&;>
711jpieper849539<http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/dag.c?r1=849538&r2=849539&;>noderev->copyfrom_path
= NULL;
712   noderev->copyfrom_rev = SVN_INVALID_REVNUM;713hwright

866391<http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/dag.c?r1=866390&r2=866391&;>


Sure looks like a useless memory allocation from the APR pool for
copyroot_path as well as dead code rotting away quietly.

As well as this earlier in the same file:
394kfogel858545<http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/dag.c?r1=858544&r2=858545&;>new_noderev.copyroot_path
= apr_pstrdup(pool,
395   
parent_noderev->copyroot_path);396jpieper849539<http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/dag.c?r1=849538&r2=849539&;>new_noderev.copyroot_rev
= parent_noderev->copyroot_rev;
397   new_noderev.copyfrom_rev = SVN_INVALID_REVNUM;398
new_noderev.copyfrom_path = NULL;

Wow, this has been here for ages... :)

Fyi,
Bill

Reply via email to