F-1118 fixed memory leak in realloc#229
Conversation
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #229
Scan targets checked: wolfclu-bugs, wolfclu-src
No new issues found in the changed files. ✅
There was a problem hiding this comment.
Pull request overview
This PR aims to fix a memory leak on XREALLOC failure in wolfCLU_getline() by using a temporary pointer and freeing the original buffer when reallocation fails.
Changes:
- Introduces a temporary pointer (
tmp) to safely handleXREALLOCresults. - Frees the original buffer and nulls
*lineptrwhenXREALLOCfails.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #229
Scan targets checked: wolfclu-bugs, wolfclu-src
No new issues found in the changed files. ✅
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #229
Scan targets checked: wolfclu-bugs, wolfclu-src
Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #229
Scan targets checked: wolfclu-bugs, wolfclu-src
No new issues found in the changed files. ✅
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #229
Scan targets checked: wolfclu-bugs, wolfclu-src
No new issues found in the changed files. ✅
|
@stenslae see one new copilot comment above, thanks |
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #229
Scan targets checked: wolfclu-bugs, wolfclu-src
No new issues found in the changed files. ✅
Assigned the XREALLOC result to a temporary pointer first, and XFREE is called on failure.