| 53 | } |
| 54 | |
| 55 | void ll_destroy( ll_t *ll, ll_data_free_t data_free ) |
| 56 | { |
| 57 | if( ll->elements ) |
| 58 | { |
| 59 | for( ll_item_t *entry = ll->head; entry != NULL; ) |
| 60 | { |
| 61 | ll_item_t *next = entry->next; |
| 62 | |
| 63 | if( data_free != NULL && entry->data != NULL ) |
| 64 | { |
| 65 | data_free( entry->data ); |
| 66 | } |
| 67 | |
| 68 | free( entry ); |
| 69 | |
| 70 | entry = next; |
| 71 | } |
| 72 | } |
| 73 | } |
no outgoing calls
no test coverage detected