forked from FFmpeg/FFmpeg
avformat/sapdec: check av_strdup() return value and fix memleak
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
parent
b1071b405d
commit
9f023017ab
1 changed files with 4 additions and 0 deletions
|
@ -142,6 +142,10 @@ static int sap_read_header(AVFormatContext *s)
|
|||
}
|
||||
|
||||
sap->sdp = av_strdup(&recvbuf[pos]);
|
||||
if (!sap->sdp) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto fail;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue