Skip to content

ldap: fix to not leak attribute on OOM (WinLDAP)#21576

Closed
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:winldapleak
Closed

ldap: fix to not leak attribute on OOM (WinLDAP)#21576
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:winldapleak

Conversation

@vszakats

Copy link
Copy Markdown
Member

Reported-by: Andrew Nesbitt

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes a Windows (WinLDAP) out-of-memory cleanup path in the LDAP transfer implementation to avoid leaking the attribute buffer when curlx_convert_tchar_to_UTF8() fails.

Changes:

  • Free attribute with ldap_memfree() before bailing out on UTF-8 conversion OOM in the WinLDAP attribute loop.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vszakats vszakats changed the title ldap: fix to not leak attribute on OOM (Windows) ldap: fix to not leak attribute on OOM (WinLDAP) May 12, 2026
@vszakats vszakats closed this in eca309c May 12, 2026
@vszakats vszakats deleted the winldapleak branch May 12, 2026 22:44
outcast36 pushed a commit to greearb/curl that referenced this pull request Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants