tm: detect local uac transaction not inserted in the hash table
authorDaniel-Constantin Mierla <miconda@gmail.com>
Fri, 7 Jun 2019 06:48:34 +0000 (08:48 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Fri, 7 Jun 2019 06:48:34 +0000 (08:48 +0200)
src/modules/tm/uac.c

index 9e67c91..340c011 100644 (file)
@@ -589,7 +589,8 @@ error2:
        if (is_ack) {
                free_cell(new_cell);
        } else {
-               if(atomic_get_int(&new_cell->ref_count)==0) {
+               if((new_cell->next_c == 0 && new_cell->prev_c == 0)
+                               || (atomic_get_int(&new_cell->ref_count)==0)) {
                        free_cell(new_cell);
                } else {
                        UNREF_FREE(new_cell, 0);