Commit 0a320f7e authored by James Almer's avatar James Almer

Merge commit '2eb396b1'

* commit '2eb396b1':
  hwcontext: Fix memory leak on derived frame allocation failure
Merged-by: 's avatarJames Almer <jamrial@gmail.com>
parents cb220586 2eb396b1
......@@ -483,8 +483,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