mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
GPU (AMD): fix use-after-free crashes
Ref: https://github.com/fastfetch-cli/fastfetch/issues/1032
This commit is contained in:
@@ -19,13 +19,12 @@ const char* ffDetectAmdGpuInfo(const FFGpuDriverCondition* cond, FFGpuDriverResu
|
||||
inited = true;
|
||||
FF_LIBRARY_LOAD(libags, NULL, "dlopen amd_ags failed", soName , 1);
|
||||
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(libags, agsInitialize)
|
||||
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(libags, agsDeInitialize)
|
||||
|
||||
struct AGSContext* apiHandle;
|
||||
if (ffagsInitialize(AGS_CURRENT_VERSION, NULL, &apiHandle, &gpuInfo) != AGS_SUCCESS)
|
||||
return "loading ags library failed";
|
||||
|
||||
ffagsDeInitialize(apiHandle);
|
||||
// agsDeInitialize will free pointers allocated in gpuInfo. Just leak them.
|
||||
}
|
||||
|
||||
if (gpuInfo.numDevices == 0)
|
||||
|
||||
Reference in New Issue
Block a user