Module: kamailio
Branch: master
Commit: 438cadf5dbee7590245199b0f299ec4337d1014e
URL: 
https://github.com/kamailio/kamailio/commit/438cadf5dbee7590245199b0f299ec4337d1014e

Author: Richard Fuchs <[email protected]>
Committer: Richard Fuchs <[email protected]>
Date: 2025-11-18T07:44:59-04:00

rtpengine: no need to lock during destruction

---

Modified: src/modules/rtpengine/rtpengine_hash.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/438cadf5dbee7590245199b0f299ec4337d1014e.diff
Patch: 
https://github.com/kamailio/kamailio/commit/438cadf5dbee7590245199b0f299ec4337d1014e.patch

---

diff --git a/src/modules/rtpengine/rtpengine_hash.c 
b/src/modules/rtpengine/rtpengine_hash.c
index 9747b09d5a6..76abc40434e 100644
--- a/src/modules/rtpengine/rtpengine_hash.c
+++ b/src/modules/rtpengine/rtpengine_hash.c
@@ -125,14 +125,6 @@ int rtpengine_hash_table_destroy()
 
        // destroy hashtable content
        for(i = 0; i < rtpengine_hash_table->size; i++) {
-               // lock
-               if(!rtpengine_hash_table->row_locks[i]) {
-                       LM_ERR("NULL rtpengine_hash_table->row_locks[%d]\n", i);
-                       continue;
-               } else {
-                       lock_get(rtpengine_hash_table->row_locks[i]);
-               }
-
                // check rtpengine hashtable->row_entry_list
                if(rtpengine_hash_table->row_entry_list) {
                        // destroy hashtable row_entry_list[i]
@@ -141,8 +133,6 @@ int rtpengine_hash_table_destroy()
                        rtpengine_hash_table->row_entry_list[i] = NULL;
                }
 
-               // unlock
-               lock_release(rtpengine_hash_table->row_locks[i]);
 
                // destroy hashtable row_locks[i]
                
rtpengine_hash_table_free_row_lock(rtpengine_hash_table->row_locks[i]);

_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to