Commit 324cf064 authored by Clément Bœsch's avatar Clément Bœsch

avcodec/ass_split: check ASSSplitContext alloc

parent c3517c37
......@@ -356,6 +356,8 @@ static int ass_split(ASSSplitContext *ctx, const char *buf)
ASSSplitContext *ff_ass_split(const char *buf)
{
ASSSplitContext *ctx = av_mallocz(sizeof(*ctx));
if (!ctx)
return NULL;
ctx->current_section = -1;
if (ass_split(ctx, buf) < 0) {
ff_ass_split_free(ctx);
......
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