Skip to content

wolfSSL_ASN1_item_i2d: simplify buf cleanup#9906

Merged
douzzer merged 2 commits intowolfSSL:masterfrom
julek-wolfssl:fenrir/25
Mar 7, 2026
Merged

wolfSSL_ASN1_item_i2d: simplify buf cleanup#9906
douzzer merged 2 commits intowolfSSL:masterfrom
julek-wolfssl:fenrir/25

Conversation

@julek-wolfssl
Copy link
Member

F-25

@julek-wolfssl julek-wolfssl self-assigned this Mar 6, 2026
Copilot AI review requested due to automatic review settings March 6, 2026 11:04
Copy link
Contributor

Copilot AI left a comment

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 simplifies the cleanup logic for buf in wolfSSL_ASN1_item_i2d by moving the buf variable declaration into the inner scope where it's used and relocating the XFREE call closer to where buf is relevant.

Changes:

  • Moved buf declaration from function scope into the if ((ret == 1) && (dest != NULL)) block.
  • Moved the XFREE(buf, ...) cleanup from the ret == 0 error block into the end of the dest != NULL block.

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

@douzzer douzzer added the Staged Staged for merge pending final test results and review label Mar 6, 2026
@douzzer douzzer merged commit f0ba67e into wolfSSL:master Mar 7, 2026
441 of 446 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For This Release Release version 5.9.0 Staged Staged for merge pending final test results and review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants