Skip to content

Fix allocation cleanup in FreeDialogResult#980

Merged
stephenegriffin merged 2 commits into
microsoft:mainfrom
sage-mode-hunter:fix-freedialogresult-cleanup
Jul 2, 2026
Merged

Fix allocation cleanup in FreeDialogResult#980
stephenegriffin merged 2 commits into
microsoft:mainfrom
sage-mode-hunter:fix-freedialogresult-cleanup

Conversation

@sage-mode-hunter

@sage-mode-hunter sage-mode-hunter commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

This change corrects the cleanup logic in FreeDialogResult.

Replace delete[] with delete when destroying _AddInDialogResult, matching its allocation with scalar new.
Release the lpDialogControlResults array after freeing the dynamically allocated members it contains.

These changes make the allocation/deallocation pairs consistent and ensure the dialog result object is fully cleaned up.

@sage-mode-hunter

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree [company="BugQore"]

@sage-mode-hunter

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree company="BugQore"

Comment thread UI/addinui.cpp Outdated
@stephenegriffin stephenegriffin merged commit 55d1d2f into microsoft:main Jul 2, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants