Commit 2eb396b1 authored by Mark Thompson's avatar Mark Thompson

hwcontext: Fix memory leak on derived frame allocation failure

parent 96e476cc
......@@ -470,8 +470,10 @@ int av_hwframe_get_buffer(AVBufferRef *hwframe_ref, AVFrame *frame, int flags)
ret = av_hwframe_get_buffer(ctx->internal->source_frames,
src_frame, 0);
if (ret < 0)
if (ret < 0) {
av_frame_free(&src_frame);
return ret;
}
ret = av_hwframe_map(frame, src_frame,
ctx->internal->source_allocation_map_flags);
......
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