On Fri, Mar 28, 2014 at 04:41:49PM +0530, Nidhi Makhijani wrote:
> ---
> libavformat/rmdec.c | 2 ++
> 1 file changed, 2 insertions(+)
rmdec: Check malloc() calls
> --- a/libavformat/rmdec.c
> +++ b/libavformat/rmdec.c
> @@ -110,6 +110,8 @@ static void rm_read_metadata(AVFormatContext *s,
> AVIOContext *pb, int wide)
> RMStream *ff_rm_alloc_rmstream (void)
> {
> RMStream *rms = av_mallocz(sizeof(RMStream));
> + if(!rms)
> + return rms;
> rms->curpic_num = -1;
> return rms;
> }
space between if and (, 4 spaces indentation
Now that you return errors from ff_rm_alloc_rmstream(), you should
also make sure that the users of that function check its return
value.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel