Skip to content

Fixed some memory leaks in PNG/APNG implementation#26715

Merged
asmorkalov merged 1 commit intoopencv:4.xfrom
asmorkalov:as/png_leak
Jan 6, 2025
Merged

Fixed some memory leaks in PNG/APNG implementation#26715
asmorkalov merged 1 commit intoopencv:4.xfrom
asmorkalov:as/png_leak

Conversation

@asmorkalov
Copy link
Copy Markdown
Contributor

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@asmorkalov asmorkalov added this to the 4.11.0 milestone Jan 5, 2025
@asmorkalov asmorkalov requested a review from vrabaud January 5, 2025 11:50
@asmorkalov asmorkalov changed the title Fixed some memory leaks in PNG/APNG implementation WIP: Fixed some memory leaks in PNG/APNG implementation Jan 5, 2025
@asmorkalov
Copy link
Copy Markdown
Contributor Author

@sturkmen72 @vrabaud I fixed some of leaks found by ASAN. There are more cases reported. I'm working on other findings.

Copy link
Copy Markdown
Contributor

@vrabaud vrabaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge that for now. Wrapping the pointers in a unique_ptr is tougher here because they have to be deleted in Paris or triplets

@opencv-alalek
Copy link
Copy Markdown
Contributor

There are still some issues: http://pullrequest.opencv.org/buildbot/builders/4_x_valgrind-lin64-debug/builds/100109

@asmorkalov asmorkalov changed the title WIP: Fixed some memory leaks in PNG/APNG implementation Fixed some memory leaks in PNG/APNG implementation Jan 6, 2025
@sturkmen72
Copy link
Copy Markdown
Contributor

There are still some issues: http://pullrequest.opencv.org/buildbot/builders/4_x_valgrind-lin64-debug/builds/100109

i believe #26714 should solve memory leak problem

@asmorkalov asmorkalov merged commit 3d7eb55 into opencv:4.x Jan 6, 2025
@asmorkalov asmorkalov mentioned this pull request Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants