Skip to content

Commit

Permalink
Fix a leak in pi_unified_runtime.cpp. (#12589)
Browse files Browse the repository at this point in the history
`LoaderConfig` is created and stored in a local pointer and never
released when done using, causing it to be leaked.
This patch releases the `LoaderConfig` when finished using it.
  • Loading branch information
yingcong-wu authored Feb 19, 2024
1 parent 5310b20 commit d697024
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sycl/plugins/unified_runtime/pi_unified_runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1349,6 +1349,7 @@ __SYCL_EXPORT pi_result piPluginInit(pi_plugin *PluginInit) {
}

HANDLE_ERRORS(urLoaderInit(0, LoaderConfig));
HANDLE_ERRORS(urLoaderConfigRelease(LoaderConfig));

uint32_t NumAdapters;
HANDLE_ERRORS(urAdapterGet(0, nullptr, &NumAdapters));
Expand Down

0 comments on commit d697024

Please sign in to comment.