Skip to content

[SAST] Fix multiple handle leaks#2763

Closed
Canned-pineapple-8 wants to merge 2 commits into
unbit:masterfrom
Canned-pineapple-8:fix/handle-leaks-issue-2761
Closed

[SAST] Fix multiple handle leaks#2763
Canned-pineapple-8 wants to merge 2 commits into
unbit:masterfrom
Canned-pineapple-8:fix/handle-leaks-issue-2761

Conversation

@Canned-pineapple-8

Copy link
Copy Markdown

Fixes 2 handle leaks found by Svace static analyzer. See issue #2762 for details.

Commits:

  1. fix(socket): close serverfd after uwsgi_nuclear_blast()
  2. fix(plugins): close plugin_handle on dlsym() failure

Closes #2762

If any fix is incorrect, please comment on the specific commit. I will update the PR accordingly.

Plugin handle acquired via dlopen() is not closed if both dlsym() calls fail. Add dlclose() to the cleanup
block before returning.

Fixes handle leak found by Svace static analyzer
…r_blast()

Socket descriptor serverfd may leak if uwsgi_nuclear_blast() returns
(e.g., when running as Emperor) instead of terminating the process.
Close the descriptor in this case.

Fixes handle leak found by Svace static analyzer
@Canned-pineapple-8 Canned-pineapple-8 changed the title [SAST] Fix multiple several leaks [SAST] Fix multiple handle leaks May 6, 2026
@Canned-pineapple-8 Canned-pineapple-8 deleted the fix/handle-leaks-issue-2761 branch May 6, 2026 06:02
@Canned-pineapple-8 Canned-pineapple-8 restored the fix/handle-leaks-issue-2761 branch May 6, 2026 06:02
@Canned-pineapple-8

Copy link
Copy Markdown
Author

Closed in favor of #2764 (branch was renamed). Sorry for the mess...

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.

[SAST] Several potential handle leaks

1 participant