microsoft / microsoft/Windows-driver-samples

[/serial/serial/VirtualSerial2]: Potential memory leak?

Open
#1,375 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
7.8k
Forks
5k
Avg merge
3d 17h
Merged PRs (30d)
7

Description

### Which is the area where the sample lives?

/serial/

### Describe the issue

New to Windows driver programming, please correct me if I'm wrong!

In `serial/VirtualSerial2/ComPort/queue.c`, function `EvtIoWrite` has some return branches that neither store `request` or complete the pending request `_In_ WDFREQUEST Request`.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in serial/VirtualSerial2/ComPort/queue.c and inspect EvtIoWrite, tracing every return branch and the lifecycle of the WDFREQUEST Request parameter. Build or run the /serial/VirtualSerial2 sample while checking whether each path stores or completes the request as required. Done means the suspected pending-request leak is confirmed or ruled out and the request is handled consistently on every branch.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.