jwoolley 2003/09/17 23:21:11
Modified: misc apr_reslist.c
Log:
check return code
Submitted by: Balazs Mezodi <[EMAIL PROTECTED]>
Reviewed by: Paul Querna <[EMAIL PROTECTED]>, Cliff Woolley
Revision Changes Path
1.4 +6 -0 apr-util/misc/apr_reslist.c
Index: apr_reslist.c
===================================================================
RCS file: /home/cvs/apr-util/misc/apr_reslist.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -u -r1.3 -r1.4
--- apr_reslist.c 4 Sep 2003 04:44:16 -0000 1.3
+++ apr_reslist.c 18 Sep 2003 06:21:11 -0000 1.4
@@ -368,6 +368,12 @@
* a resource to fill the slot and use it. */
else {
rv = create_resource(reslist, &res);
+
+ if (rv != APR_SUCCESS) {
+ apr_thread_mutex_unlock(reslist->listlock);
+ return rv;
+ }
+
reslist->ntotal++;
*resource = res->opaque;
free_container(reslist, res);