Commit 9f023017 authored by Steven Liu's avatar Steven Liu

avformat/sapdec: check av_strdup() return value and fix memleak

Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarSteven Liu <lq@chinaffmpeg.org>
parent b1071b40
......@@ -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;
}
......
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