prefetch: fix controls leaks on early cancel
authorFrancois Cartegnie <fcvlcdev@free.fr>
Thu, 17 May 2018 09:24:21 +0000 (11:24 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Thu, 17 May 2018 11:54:20 +0000 (13:54 +0200)
modules/stream_filter/prefetch.c

index 1efdc84..b3c6146 100644 (file)
@@ -532,6 +532,12 @@ static void Close (vlc_object_t *obj)
     vlc_cond_destroy(&sys->wait_data);
     vlc_mutex_destroy(&sys->lock);
 
+    while(sys->controls)
+    {
+        struct stream_ctrl *ctrl = sys->controls;
+        sys->controls = ctrl->next;
+        free(ctrl);
+    }
     free(sys->buffer);
     free(sys->content_type);
     free(sys);