Skip to content

Commit

Permalink
[apache#6236] fix(core): fix possible resource leak in BaseCatalog
Browse files Browse the repository at this point in the history
fix  possible resource leak in BaseCatalog.
  • Loading branch information
Abyss-lord committed Jan 15, 2025
1 parent 39ad18a commit 62d140a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,8 @@ public void initAuthorizationPluginInstance(IsolatedClassLoader classLoader) {
LOG.info("Authorization provider is not set!");
return;
}
try {
BaseAuthorization<?> authorization =
BaseAuthorization.createAuthorization(classLoader, authorizationProvider);
try (BaseAuthorization<?> authorization =
BaseAuthorization.createAuthorization(classLoader, authorizationProvider)) {
authorizationPlugin =
authorization.newPlugin(entity.namespace().level(0), provider(), this.conf);
} catch (Exception e) {
Expand Down

0 comments on commit 62d140a

Please sign in to comment.