Commit e06cac46 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Revert "stream_filter/record.c: Read() return 0 on malloc failure."

stream_Read() is designed to allow a NULL pointer as second argument.
Therefor this commit was wrong. I added a note to avoid making the same
mistake.

This reverts commit a7ef53d4.
parent f2421a4a
...@@ -121,10 +121,7 @@ static int Read( stream_t *s, void *p_read, unsigned int i_read ) ...@@ -121,10 +121,7 @@ static int Read( stream_t *s, void *p_read, unsigned int i_read )
if( p_sys->f && !p_record ) if( p_sys->f && !p_record )
p_record = malloc( i_read ); p_record = malloc( i_read );
if (!p_record) /* p_record is allowed to be NULL */
return 0; /* VLC_ENOMEM */
/* */
const int i_record = stream_Read( s->p_source, p_record, i_read ); const int i_record = stream_Read( s->p_source, p_record, i_read );
/* Dump read data */ /* Dump read data */
......
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