Skip to content

Refactor resource cleanup in windows path#981

Open
yosuke-wolfssl wants to merge 1 commit into
wolfSSL:masterfrom
yosuke-wolfssl:fWindows
Open

Refactor resource cleanup in windows path#981
yosuke-wolfssl wants to merge 1 commit into
wolfSSL:masterfrom
yosuke-wolfssl:fWindows

Conversation

@yosuke-wolfssl
Copy link
Copy Markdown
Contributor

This PR fixes the resource cleanup in the following windows path:

  • Refactor resource cleanup pattern in SHELL_Subsystem.
  • Add missing WFREE in wolfSSH_SFTP_RecvOpenDir.

Addressed by f_523 and f_860.

@yosuke-wolfssl yosuke-wolfssl self-assigned this May 15, 2026
Copilot AI review requested due to automatic review settings May 15, 2026 04:04
Copy link
Copy Markdown
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 refactors cleanup in the Windows shell subsystem and fixes a missing SFTP directory-name free path.

Changes:

  • Adds centralized cleanup for Windows shell subsystem resources.
  • Frees dirName when wolfSSH_SFTP_RecvOpenDir() rejects an overlong path.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/wolfsftp.c Adds missing WFREE before returning on an overlong directory path.
apps/wolfsshd/wolfsshd.c Moves Windows shell command/process/pipe cleanup into a shared cleanup path.

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

Comment thread apps/wolfsshd/wolfsshd.c Outdated
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.

3 participants