Skip to content

Commit

Permalink
encoder_aom.cc: fix memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed Aug 24, 2024
1 parent f49905f commit 5435e39
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 5435e39

Please sign in to comment.