Commit 036d3e3f authored by Jean-Paul Saman's avatar Jean-Paul Saman

Don't get stuck in Connect() when module is in Open() function, when it is being destroyed again.

parent d38e2710
...@@ -953,6 +953,12 @@ static int Connect( access_t *p_access, int64_t i_tell ) ...@@ -953,6 +953,12 @@ static int Connect( access_t *p_access, int64_t i_tell )
i_status = 0; i_status = 0;
free( psz ); free( psz );
if( p_access->b_die || p_access->b_error )
{
Disconnect( p_access );
return -1;
}
} }
while( i_status ); while( i_status );
} }
...@@ -1171,6 +1177,12 @@ static int Request( access_t *p_access, int64_t i_tell ) ...@@ -1171,6 +1177,12 @@ static int Request( access_t *p_access, int64_t i_tell )
goto error; goto error;
} }
if( p_access->b_die || p_access->b_error )
{
free( psz );
goto error;
}
/* msg_Dbg( p_input, "Line=%s", psz ); */ /* msg_Dbg( p_input, "Line=%s", psz ); */
if( *psz == '\0' ) if( *psz == '\0' )
{ {
...@@ -1178,7 +1190,6 @@ static int Request( access_t *p_access, int64_t i_tell ) ...@@ -1178,7 +1190,6 @@ static int Request( access_t *p_access, int64_t i_tell )
break; break;
} }
if( ( p = strchr( psz, ':' ) ) == NULL ) if( ( p = strchr( psz, ':' ) ) == NULL )
{ {
msg_Err( p_access, "malformed header line: %s", psz ); msg_Err( p_access, "malformed header line: %s", psz );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment