[vlc-commits] stream_ReadLine: don't gratuitiously close iconv handle on unrelated error
Pierre Ynard
git at videolan.org
Tue Oct 27 09:10:11 CET 2020
vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Tue Oct 27 08:44:29 2020 +0100| [520e79aa6e9d68de56352f701cd6eae7141cf20f] | committer: Pierre Ynard
stream_ReadLine: don't gratuitiously close iconv handle on unrelated error
The only errors after which this was called were memory allocation
errors, lines too long, or failing to open the handle itself, so
obviously there is no reason to want to close it there; it already gets
closed in the proper place when the stream is destroyed.
Even worse, it left the handle missing if vlc_stream_ReadLine() was
called again, and would result in text conversion constantly failing and
no output getting returned anymore, rendering the rest of the stream
unusable through this API and precluding any error recovery.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=520e79aa6e9d68de56352f701cd6eae7141cf20f
---
src/input/stream.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/src/input/stream.c b/src/input/stream.c
index 90651de058..65e1e241f3 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -370,13 +370,6 @@ char *vlc_stream_ReadLine( stream_t *s )
error:
/* We failed to read any data, probably EOF */
free( p_line );
-
- /* */
- if( priv->text.conv != (vlc_iconv_t)(-1) )
- {
- vlc_iconv_close( priv->text.conv );
- priv->text.conv = (vlc_iconv_t)(-1);
- }
return NULL;
}
More information about the vlc-commits
mailing list