Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heif_encoder_aom.cc: Fix input_image leak on error #801

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions libheif/plugins/heif_encoder_aom.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,7 @@ struct heif_error aom_encode_image(void* encoder_raw, const struct heif_image* i
// --- encode frame

err = encode_frame(encoder, &codec, &input_image); //, frame_count++, flags, writer);
aom_img_free(&input_image);
if (err.code != heif_error_Ok) {
return err;
}
Expand Down Expand Up @@ -1092,8 +1093,6 @@ struct heif_error aom_encode_image(void* encoder_raw, const struct heif_image* i

// --- clean up

aom_img_free(&input_image);

if (aom_codec_destroy(&codec)) {
// Note: do not call aom_codec_error_detail(), because it is not set in aom_codec_destroy(). (see #788)
err = {heif_error_Encoder_plugin_error,
Expand Down