Commit de776714 authored by Anton Khirnov's avatar Anton Khirnov

decode: avoid leaks on failure in ff_get_buffer()

If the get_buffer() call fails, the frame might have some side data
already set. Make sure it gets freed.

CC: libav-stable@libav.org
parent 70946e60
...@@ -1069,6 +1069,9 @@ end: ...@@ -1069,6 +1069,9 @@ end:
frame->height = avctx->height; frame->height = avctx->height;
} }
if (ret < 0)
av_frame_unref(frame);
return ret; return ret;
} }
......
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