apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gunter Coelle <gunter.coe...@dbaudio.com>
Subject [PATCH] Bugfix on deletion of hash entires
Date Fri, 02 May 2003 12:31:44 GMT
The doc for apr_hash_first states:

 "There is no restriction on adding or deleting hash entries during an
 iteration(...)"


This is not true for a constelation as follows:
If the table iterator (apr_hash_index_t struct) hi->next points to an 
entry, which is beeing deleted between two calls of apr_hash_next(), 
then the second apr_hash_next() will still return the deleted entry.

The following patch tries to solve this by marking the deleted entry by 
setting the value to NULL.

- gunter


Mime
View raw message