Skip to content

Commit

Permalink
fixed leak serializing rules' operator
Browse files Browse the repository at this point in the history
mainly when connecting by the first time to the GUI, and at the same
time asking to allow/deny a connection.
  • Loading branch information
gustavo-iniguez-goya committed Dec 9, 2023
1 parent 250dcb1 commit 9efaa37
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions daemon/rule/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ func (r *Rule) Serialize() *protocol.Rule {
if r == nil {
return nil
}
r.Operator.Lock()
defer r.Operator.Unlock()

protoRule := &protocol.Rule{
Created: r.Created.Unix(),
Name: string(r.Name),
Expand Down

0 comments on commit 9efaa37

Please sign in to comment.