diff options
-rw-r--r-- | src/estream.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/estream.c b/src/estream.c index a23d817..6b531fb 100644 --- a/src/estream.c +++ b/src/estream.c @@ -461,19 +461,14 @@ do_list_remove (estream_t stream, int with_locked_list) else item_prev = item; - if (item_prev) + if (item) { - item_prev->next = item->next; + if (item_prev) + item_prev->next = item->next; + else + estream_list = item->next; mem_free (item); } - else - { - if (item) - { - estream_list = item->next; - mem_free (item); - } - } if (!with_locked_list) unlock_list (); |