diff --git a/libavformat/mov.c b/libavformat/mov.c index f280f360b6..f01502a5f8 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1005,6 +1005,7 @@ static int mov_read_adrm(MOVContext *c, AVIOContext *pb, MOVAtom atom) sha = av_sha_alloc(); if (!sha) return AVERROR(ENOMEM); + av_free(c->aes_decrypt); c->aes_decrypt = av_aes_alloc(); if (!c->aes_decrypt) { ret = AVERROR(ENOMEM);