Skip to content

Commit

Permalink
Merge pull request #1282 from kleisauke/encoder-aom-fix-mem-leaks
Browse files Browse the repository at this point in the history
encoder_aom.cc: fix memory leaks
  • Loading branch information
farindk authored Aug 24, 2024
2 parents f49905f + 5435e39 commit c6d22a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libheif/plugins/encoder_aom.cc
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,7 @@ struct heif_error aom_encode_image(void* encoder_raw, const struct heif_image* i
err = {heif_error_Unsupported_feature,
heif_suberror_Unsupported_codec,
"Unsupported codec: AOMedia Project AV1 Encoder"};
aom_img_free(&input_image);
return err;
}

Expand All @@ -891,6 +892,7 @@ struct heif_error aom_encode_image(void* encoder_raw, const struct heif_image* i
err = {heif_error_Encoder_plugin_error,
heif_suberror_Encoder_initialization,
kError_codec_enc_config_default};
aom_img_free(&input_image);
return err;
}

Expand Down Expand Up @@ -966,6 +968,7 @@ struct heif_error aom_encode_image(void* encoder_raw, const struct heif_image* i
err = {heif_error_Encoder_plugin_error,
heif_suberror_Encoder_initialization,
encoder->set_aom_error(aom_codec_error_detail(&codec))};
aom_img_free(&input_image);
return err;
}

Expand Down

0 comments on commit c6d22a6

Please sign in to comment.