Xilinx / Xilinx/embeddedsw

XRFdc_GetDeviceNameByDeviceId leaks DIR handles

Open
#184 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1.2k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

XRFdc_GetDeviceNameByDeviceId() is missing a corresponding closedir() at the end of the if-statement.

On my system these leak at ~32k each.

See: https://github.com/Xilinx/embeddedsw/blob/a8e6ff65ba32cef65062e9f3bd04e680fcb8d9bf/XilinxProcessorIPLib/drivers/rfdc/src/xrfdc_sinit.c#L134-L162

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

Open XilinxProcessorIPLib/drivers/rfdc/src/xrfdc_sinit.c around lines 134-162 and inspect XRFdc_GetDeviceNameByDeviceId(). Confirm the directory handle opened in the if-statement is not closed, then ensure the matching cleanup occurs before leaving that block. Done means the function no longer leaks DIR handles while preserving its existing device-name behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.