[vlc-commits] httpd: use assertion instead of leaking
Rémi Denis-Courmont
git at videolan.org
Sun Jun 17 22:20:00 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jun 17 21:14:59 2018 +0300| [b1bc1d3cdafa71553158137adb1d272fcc88a303] | committer: Rémi Denis-Courmont
httpd: use assertion instead of leaking
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b1bc1d3cdafa71553158137adb1d272fcc88a303
---
src/network/httpd.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/network/httpd.c b/src/network/httpd.c
index f6c1cc4cc2..acdf824580 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -998,7 +998,6 @@ error:
void httpd_HostDelete(httpd_host_t *host)
{
httpd_client_t *client;
- httpd_url_t *url;
vlc_mutex_lock(&httpd.mutex);
@@ -1015,14 +1014,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