[PR #1464] [CLOSED] udp: Add an Unlock before a continue, to fix a double lock bug #4393

Closed
opened 2026-05-05 14:41:12 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fatedier/frp/pull/1464
Author: @lzhfromustc
Created: 10/15/2019
Status: Closed

Base: devHead: udp_mis_unlock


📝 Commits (7)

  • 6451583 Merge pull request #1349 from fatedier/dev
  • ae08811 Merge pull request #1364 from fatedier/dev
  • 134a46c Merge pull request #1369 from fatedier/dev
  • e62d9a5 Merge pull request #1415 from fatedier/dev
  • b5db184 udp: Add an Unlock before a continue, to fix a double lock bug
  • e48fe27 udp: Add an Unlock before a continue, to fix a double lock bug
  • 63ac850 Merge branch 'dev' of github.com:lzhfromustc/frp into udp_mis_unlock

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 models/proto/udp/udp.go (+1 -0)

📄 Description

Description
A mutex mu is locked at line 115 of udp.go, and unlocked at line 124. However, there is a continue at line 120 if err != nil, and there is no unlock before this continue. So if the continue is executed, there will be a double lock bug.

How it is fixed
Add an mu.Unlock() before the continue.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fatedier/frp/pull/1464 **Author:** [@lzhfromustc](https://github.com/lzhfromustc) **Created:** 10/15/2019 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `udp_mis_unlock` --- ### 📝 Commits (7) - [`6451583`](https://github.com/fatedier/frp/commit/6451583e60184a90c274f6683a44e89fb7a9118e) Merge pull request #1349 from fatedier/dev - [`ae08811`](https://github.com/fatedier/frp/commit/ae08811636f6ab449deb30cf7579390f9d476ab3) Merge pull request #1364 from fatedier/dev - [`134a46c`](https://github.com/fatedier/frp/commit/134a46c00b59a641dc89ab9265ea73d2d7aa6ff2) Merge pull request #1369 from fatedier/dev - [`e62d9a5`](https://github.com/fatedier/frp/commit/e62d9a52429f54dee8df1c42f2d4bad7a267b05d) Merge pull request #1415 from fatedier/dev - [`b5db184`](https://github.com/fatedier/frp/commit/b5db1840e98769e0ec0560a9e53bd0bd45cf91fb) udp: Add an Unlock before a continue, to fix a double lock bug - [`e48fe27`](https://github.com/fatedier/frp/commit/e48fe27cad6b9ef1df88dd1e181f5eebc84c3c30) udp: Add an Unlock before a continue, to fix a double lock bug - [`63ac850`](https://github.com/fatedier/frp/commit/63ac850601330d5173dc126f5baa29d78debd88e) Merge branch 'dev' of github.com:lzhfromustc/frp into udp_mis_unlock ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `models/proto/udp/udp.go` (+1 -0) </details> ### 📄 Description ***Description*** A mutex `mu` is locked at line 115 of [udp.go](https://github.com/fatedier/frp/blob/master/models/proto/udp/udp.go#L115), and unlocked at line 124. However, there is a `continue` at line 120 if `err != nil`, and there is no unlock before this `continue`. So if the `continue` is executed, there will be a double lock bug. ***How it is fixed*** Add an `mu.Unlock()` before the continue. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 14:41:12 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#4393
No description provided.