Browse Source

avformat/riffdec: Use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.6
Michael Niedermayer 11 years ago
parent
commit
fd3e7447c8
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/riffdec.c

+ 1
- 1
libavformat/riffdec.c View File

@@ -132,7 +132,7 @@ int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size, int big_
size -= 22;
}
if (cbSize > 0) {
av_free(codec->extradata);
av_freep(&codec->extradata);
if (ff_get_extradata(codec, pb, cbSize) < 0)
return AVERROR(ENOMEM);
size -= cbSize;


Loading…
Cancel
Save