diff --git a/modules/codec/vpx.c b/modules/codec/vpx.c index d626038ccc..76331a714b 100644 --- a/modules/codec/vpx.c +++ b/modules/codec/vpx.c @@ -478,6 +478,7 @@ static block_t *Encode(encoder_t *p_enc, picture_t *p_pict) flags, quality); if (res != VPX_CODEC_OK) { VPX_ERR(p_enc, ctx, "Failed to encode frame"); + vpx_img_free(&img); return NULL; }