Merge pull request #1468 from Gowa2017/fix_sdf_print_device_info

OpenSession need a pointer of pointer
This commit is contained in:
Zhi Guan
2023-10-12 13:44:32 +08:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -103,7 +103,7 @@ int sdf_print_device_info(FILE *fp, int fmt, int ind, const char *lable, SDF_DEV
void *hSession = NULL;
DEVICEINFO devInfo;
if (SDF_OpenSession(dev->handle, hSession) != SDR_OK
if (SDF_OpenSession(dev->handle, &hSession) != SDR_OK
|| SDF_GetDeviceInfo(hSession, &devInfo) != SDR_OK) {
error_print();
goto end;

View File

@@ -97,7 +97,7 @@ end:
void SDF_METHOD_free(SDF_METHOD *meth)
{
if (meth) free(meth->dso);
if (meth) dylib_close_library(meth->dso);
free(meth);
}