[vlc-commits] httpd: use assertion instead of leaking

Rémi Denis-Courmont git at videolan.org
Sun Jun 17 20:16:52 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jun 17 21:14:59 2018 +0300| [0fddd8d8777e76ac53d18749dbbc2f26bcb9cfd9] | committer: Rémi Denis-Courmont

httpd: use assertion instead of leaking

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0fddd8d8777e76ac53d18749dbbc2f26bcb9cfd9
---

 src/network/httpd.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/network/httpd.c b/src/network/httpd.c
index f6c1cc4cc2..dea4323ef0 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -1015,14 +1015,12 @@ void httpd_HostDelete(httpd_host_t *host)
 
     msg_Dbg(host, "HTTP host removed");
 
-    vlc_list_foreach(url, &host->urls, node)
-        msg_Err(host, "url still registered: %s", url->psz_url);
-
     vlc_list_foreach(client, &host->clients, node) {
         msg_Warn(host, "client still connected");
         httpd_ClientDestroy(client);
     }
 
+    assert(vlc_list_is_empty(&host->urls));
     vlc_tls_Delete(host->p_tls);
     net_ListenClose(host->fds);
     vlc_cond_destroy(&host->wait);



More information about the vlc-commits mailing list