sca_hash_table_slot_kv_delete_unsafe() uses internally sca_hash_entry but incorrectly called sca_hash_table_slot_kv_find_unsafe() to initialize the entry. That function returns the node value, not the node itself. Use instead sca_hash_table_slot_kv_find_entry_unsafe().
Should fix the crash in FS#366. --- amortensen: is it ok for me to commit this?
modules/sca/sca_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/sca/sca_hash.c b/modules/sca/sca_hash.c index 996acd9..a92b6c4 100644 --- a/modules/sca/sca_hash.c +++ b/modules/sca/sca_hash.c @@ -264,7 +264,7 @@ sca_hash_table_slot_kv_delete_unsafe( sca_hash_slot *slot, str *key ) { sca_hash_entry *e;
- e = sca_hash_table_slot_kv_find_unsafe( slot, key ); + e = sca_hash_table_slot_kv_find_entry_unsafe( slot, key ); if ( e == NULL ) { return( -1 ); }