Skip to content

Commit

Permalink
fix: Memory leak in repo-server (#20876) (#20894)
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Chandler <[email protected]>
Co-authored-by: Adam Chandler <[email protected]>
  • Loading branch information
gcp-cherry-pick-bot[bot] and AJChandler authored Nov 21, 2024
1 parent 0680ddb commit f8d6665
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 f8d6665

Please sign in to comment.