From e9cbd35ba6d5f229bfae9c1c1f0b9559214703a7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Wed, 14 Jan 2009 21:58:51 +0200 Subject: [PATCH] httpd: fix error handling path --- src/network/httpd.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/network/httpd.c b/src/network/httpd.c index 4a1ddd0307..f913608e84 100644 --- a/src/network/httpd.c +++ b/src/network/httpd.c @@ -1073,15 +1073,6 @@ httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, const char *psz_hostname, if (host == NULL) goto error; - vlc_object_lock( host ); - if( vlc_object_waitpipe( VLC_OBJECT( host ) ) == -1 ) - { - msg_Err( host, "signaling pipe error: %m" ); - vlc_object_unlock( host ); - goto error; - } - vlc_object_unlock( host ); - host->httpd = httpd; vlc_mutex_init( &host->lock ); host->i_ref = 1; @@ -1094,6 +1085,12 @@ httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, const char *psz_hostname, } for (host->nfd = 0; host->fds[host->nfd] != -1; host->nfd++); + if( vlc_object_waitpipe( VLC_OBJECT( host ) ) == -1 ) + { + msg_Err( host, "signaling pipe error: %m" ); + goto error; + } + host->i_port = i_port; host->psz_hostname = psz_host; -- 2.39.2