Skip to content

Update IccTagMPE.cpp - #148

Merged
maxderhak merged 1 commit into
InternationalColorConsortium:masterfrom
xsscx:free-mismatch
Jul 23, 2025
Merged

Update IccTagMPE.cpp#148
maxderhak merged 1 commit into
InternationalColorConsortium:masterfrom
xsscx:free-mismatch

Conversation

@xsscx

@xsscx xsscx commented Jul 23, 2025

Copy link
Copy Markdown
Member

Memory allocated with calloc is deallocated using free instead of delete [].

Memory allocated with calloc is deallocated using free instead of delete [].
@xsscx
xsscx requested a review from Copilot July 23, 2025 22:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a memory management bug by correcting the deallocation method for memory allocated with calloc. The issue was that memory allocated with calloc was being deallocated using delete[] instead of the correct free() function.

  • Fixes memory deallocation mismatch by replacing delete[] with free() for calloc-allocated memory

Comment thread IccProfLib/IccTagMPE.cpp
@xsscx xsscx added the bug Confirmed or suspected defect label Jul 23, 2025
@xsscx xsscx self-assigned this Jul 23, 2025
@xsscx
xsscx marked this pull request as ready for review July 23, 2025 22:47
@xsscx
xsscx requested a review from maxderhak July 23, 2025 22:48
@maxderhak
maxderhak merged commit 3da9299 into InternationalColorConsortium:master Jul 23, 2025
@xsscx
xsscx deleted the free-mismatch branch July 24, 2025 00:34
@xsscx xsscx mentioned this pull request Sep 3, 2026
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Confirmed or suspected defect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants