From 036d3e3fb94566f333fb24568442e0f0afc57d3a Mon Sep 17 00:00:00 2001 From: Jean-Paul Saman Date: Wed, 20 Feb 2008 14:39:57 +0000 Subject: [PATCH] Don't get stuck in Connect() when module is in Open() function, when it is being destroyed again. --- modules/access/http.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/access/http.c b/modules/access/http.c index 9dde912893..c669400e4c 100644 --- a/modules/access/http.c +++ b/modules/access/http.c @@ -953,6 +953,12 @@ static int Connect( access_t *p_access, int64_t i_tell ) i_status = 0; free( psz ); + + if( p_access->b_die || p_access->b_error ) + { + Disconnect( p_access ); + return -1; + } } while( i_status ); } @@ -1171,6 +1177,12 @@ static int Request( access_t *p_access, int64_t i_tell ) goto error; } + if( p_access->b_die || p_access->b_error ) + { + free( psz ); + goto error; + } + /* msg_Dbg( p_input, "Line=%s", psz ); */ if( *psz == '\0' ) { @@ -1178,7 +1190,6 @@ static int Request( access_t *p_access, int64_t i_tell ) break; } - if( ( p = strchr( psz, ':' ) ) == NULL ) { msg_Err( p_access, "malformed header line: %s", psz ); -- GitLab