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

Re: svn commit: rev 4384 - trunk/subversion/libsvn_wc

From: Branko Čibej <brane_at_xbc.nu>
Date: 2003-01-14 19:03:26 CET

kfogel@tigris.org wrote:

>Author: kfogel
>Date: 2003-01-14 11:28:21 -0600 (Tue, 14 Jan 2003)
>New Revision: 4384
>
>Modified:
> trunk/subversion/libsvn_wc/adm_crawler.c
>Log:
>Fix some leakage noticed by Greg "I Use Sonar To Detect Memory Leaks,
>Just Like Our Furry Bat Friends" Stein:
>
>* subversion/libsvn_wc/adm_crawler.c
> (svn_wc_transmit_text_deltas): Clear ignored error.
>
>
>Modified: trunk/subversion/libsvn_wc/adm_crawler.c
>==============================================================================
>--- trunk/subversion/libsvn_wc/adm_crawler.c (original)
>+++ trunk/subversion/libsvn_wc/adm_crawler.c Tue Jan 14 11:28:27 2003
>@@ -610,10 +610,15 @@
> investigate. Other commands could be affected,
> too, such as `svn diff'. */
>
>- /* Deliberately ignore error here; the error about the
>- checksum mismatch is more important to return. */
>- svn_io_remove_file (tmp_base, pool);
>+ svn_error_t *err = svn_io_remove_file (tmp_base, pool);
>
>+ /* Deliberately ignore error; the error about the
>+ checksum mismatch is more important to return.
>+ And wrapping the above error into the checksum
>+ error would be weird, as they're unrelated. */
>+ if (err)
>+ svn_error_clear (err);
>+
> if (tempfile)
> *tempfile = NULL;
>
>

How about

    svn_error_clear (svn_io_remove_file (tmp_base, pool));

svn_error_clear checks for NULL; the docstring says so.

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jan 14 19:04:23 2003

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