]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fix improper handling of a double linked list that could have caused a memory leak.
authorWilliam King <william.king@quentustech.com>
Sat, 25 May 2013 02:42:02 +0000 (19:42 -0700)
committerWilliam King <william.king@quentustech.com>
Sat, 25 May 2013 02:42:02 +0000 (19:42 -0700)
src/mod/endpoints/mod_rtmp/libamf/src/amf0.c

index 9914d5ab215416ffd3c80f2566538d1fb99fb86f..d6230d3f0bbf147bc2fd484c3e25cc8121bcb4e3 100644 (file)
@@ -40,11 +40,13 @@ static amf0_data * amf0_list_insert_before(amf0_list * list, amf0_node * node, a
         if (new_node != NULL) {
             new_node->next = node;
             new_node->prev = node->prev;
-
+           
             if (node->prev != NULL) {
                 node->prev->next = new_node;
-                node->prev = new_node;
             }
+
+           node->prev = new_node;
+
             if (node == list->first_element) {
                 list->first_element = new_node;
             }