Module: libav
Branch: master
Commit: 50079a6aa93291e6dc9d9fb8d33da83f79e9311d

Author:    Anton Khirnov <[email protected]>
Committer: Anton Khirnov <[email protected]>
Date:      Mon Dec 16 22:54:43 2013 +0100

lavc: do not leak the internal frame if opening the codec fails

---

 libavcodec/utils.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 1c56d79..1b29b1b 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1102,8 +1102,10 @@ end:
 free_and_end:
     av_dict_free(&tmp);
     av_freep(&avctx->priv_data);
-    if (avctx->internal)
+    if (avctx->internal) {
+        av_frame_free(&avctx->internal->to_free);
         av_freep(&avctx->internal->pool);
+    }
     av_freep(&avctx->internal);
     avctx->codec = NULL;
     goto end;

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to