[Bf-blender-cvs] [24fd8f729a5] master: Fix memory leak when proxy building fails
Richard Antalik
noreply at git.blender.org
Thu Oct 20 18:00:08 CEST 2022
Commit: 24fd8f729a58b18159912a84525b910b0d4e7ef5
Author: Richard Antalik
Date: Thu Oct 20 17:54:29 2022 +0200
Branches: master
https://developer.blender.org/rB24fd8f729a58b18159912a84525b910b0d4e7ef5
Fix memory leak when proxy building fails
Leak introduced in recent fix - bf8d4a9bc6fb28.
===================================================================
M source/blender/imbuf/intern/indexer.c
===================================================================
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
index e8e4b80ef45..eaa72441fb6 100644
--- a/source/blender/imbuf/intern/indexer.c
+++ b/source/blender/imbuf/intern/indexer.c
@@ -909,6 +909,9 @@ static IndexBuildContext *index_ffmpeg_create_context(struct anim *anim,
if (context->proxy_ctx[0] == NULL && context->proxy_ctx[1] == NULL &&
context->proxy_ctx[2] == NULL && context->proxy_ctx[3] == NULL) {
+ avformat_close_input(&context->iFormatCtx);
+ avcodec_free_context(&context->iCodecCtx);
+ MEM_freeN(context);
return NULL; /* Nothing to transcode. */
}
More information about the Bf-blender-cvs
mailing list