You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by mt...@apache.org on 2008/08/07 07:56:01 UTC
svn commit: r683517 - /apr/apr-util/trunk/misc/apr_reslist.c
Author: mturk
Date: Wed Aug 6 22:56:01 2008
New Revision: 683517
URL: http://svn.apache.org/viewvc?rev=683517&view=rev
Log:
Destroy already created resources if create fails
Modified:
apr/apr-util/trunk/misc/apr_reslist.c
Modified: apr/apr-util/trunk/misc/apr_reslist.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/misc/apr_reslist.c?rev=683517&r1=683516&r2=683517&view=diff
==============================================================================
--- apr/apr-util/trunk/misc/apr_reslist.c (original)
+++ apr/apr-util/trunk/misc/apr_reslist.c Wed Aug 6 22:56:01 2008
@@ -304,6 +304,9 @@
rv = reslist_maint(rl);
if (rv != APR_SUCCESS) {
+ /* Destroy what we've created so far.
+ */
+ reslist_cleaup(rl);
return rv;
}
Re: svn commit: r683517 - /apr/apr-util/trunk/misc/apr_reslist.c
Posted by Bojan Smojver <bo...@rexursive.com>.
On Thu, 2008-08-07 at 09:52 +0200, Mladen Turk wrote:
> We might also backport the apr_reslist_cleanup_order_set
> but of course not set it up as exported but only usable
> inside apr-util if that'll help unifying memcache.
Whatever the list prefers on this one is good for me. We can either go
with that or with malloc()/free() trickery I sent to the list a while
ago.
--
Bojan
Re: svn commit: r683517 - /apr/apr-util/trunk/misc/apr_reslist.c
Posted by Mladen Turk <mt...@apache.org>.
Bojan Smojver wrote:
> On Thu, 2008-08-07 at 05:56 +0000, mturk@apache.org wrote:
>
>> Destroy already created resources if create fails
>
> Nice catch! We should earmark this one for backport to 1.3.x if nobody
> objects.
>
Right, that's the idea.
We might also backport the apr_reslist_cleanup_order_set
but of course not set it up as exported but only usable
inside apr-util if that'll help unifying memcache.
Regards
--
^(TM)
Re: svn commit: r683517 - /apr/apr-util/trunk/misc/apr_reslist.c
Posted by Bojan Smojver <bo...@rexursive.com>.
On Thu, 2008-08-07 at 05:56 +0000, mturk@apache.org wrote:
> Destroy already created resources if create fails
Nice catch! We should earmark this one for backport to 1.3.x if nobody
objects.
--
Bojan