Skip to content

Commit

Permalink
fix: Memory leak in repo-server (#20876)
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Chandler <adam_chandler@trimble.com>
  • Loading branch information
AJChandler authored Nov 21, 2024
1 parent 4a14051 commit c6804e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions util/app/discovery/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ func cmpSupports(ctx context.Context, pluginSockFilePath, appPath, repoPath, fil
cfg, err := cmpClient.CheckPluginConfiguration(ctx, &empty.Empty{})
if err != nil {
log.Errorf("error checking plugin configuration %s, %v", fileName, err)
io.Close(conn)
return nil, nil, false
}

Expand All @@ -178,6 +179,7 @@ func cmpSupports(ctx context.Context, pluginSockFilePath, appPath, repoPath, fil
if namedPlugin {
return conn, cmpClient, true
}
io.Close(conn)
return nil, nil, false
}

Expand Down

0 comments on commit c6804e9

Please sign in to comment.