diff --git a/src/sdf/sdf.c b/src/sdf/sdf.c index ee186c4fb..183b3bad7 100755 --- a/src/sdf/sdf.c +++ b/src/sdf/sdf.c @@ -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; diff --git a/src/sdf/sdf_meth.c b/src/sdf/sdf_meth.c index 44b87e68f..e4b77a38d 100755 --- a/src/sdf/sdf_meth.c +++ b/src/sdf/sdf_meth.c @@ -97,7 +97,7 @@ SDF_METHOD *SDF_METHOD_load_library(const char *so_path) void SDF_METHOD_free(SDF_METHOD *meth) { - if (meth) free(meth->dso); + if (meth) dylib_close_library(meth->dso); free(meth); }