You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@apache.org on 2002/03/08 03:48:01 UTC
cvs commit: modperl-2.0/src/modules/perl modperl_tipool.c
dougm 02/03/07 18:48:01
Modified: src/modules/perl modperl_tipool.c
Log:
Submitted by: Philippe M. Chiasson <go...@cpan.org>
Reviewed by: dougm
prevent possible segv if one uses modperl_tipool_putback_data with an
item that was never part of the pool.
Revision Changes Path
1.7 +6 -0 modperl-2.0/src/modules/perl/modperl_tipool.c
Index: modperl_tipool.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_tipool.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- modperl_tipool.c 4 Mar 2001 18:49:39 -0000 1.6
+++ modperl_tipool.c 8 Mar 2002 02:48:01 -0000 1.7
@@ -286,6 +286,12 @@
tipool->busy = modperl_list_remove_data(tipool->busy, data, &listp);
}
+ if (!listp) {
+ /* XXX: Attempt to putback something that was never there */
+ modperl_tipool_unlock(tipool);
+ return;
+ }
+
tipool->idle = modperl_list_prepend(tipool->idle, listp);
tipool->in_use--;