summaryrefslogtreecommitdiff
path: root/src/libstrongswan/plugins/pkcs11/pkcs11_library.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/pkcs11/pkcs11_library.c')
-rw-r--r--src/libstrongswan/plugins/pkcs11/pkcs11_library.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstrongswan/plugins/pkcs11/pkcs11_library.c b/src/libstrongswan/plugins/pkcs11/pkcs11_library.c
index 97c3d2fcf..7661473b1 100644
--- a/src/libstrongswan/plugins/pkcs11/pkcs11_library.c
+++ b/src/libstrongswan/plugins/pkcs11/pkcs11_library.c
@@ -21,9 +21,9 @@
#include <dlfcn.h>
#include <library.h>
-#include <debug.h>
+#include <utils/debug.h>
#include <threading/mutex.h>
-#include <utils/linked_list.h>
+#include <collections/linked_list.h>
typedef struct private_pkcs11_library_t private_pkcs11_library_t;
@@ -895,6 +895,7 @@ METHOD(pkcs11_library_t, destroy, void,
{
this->public.f->C_Finalize(NULL);
dlclose(this->handle);
+ free(this->name);
free(this);
}
@@ -1077,7 +1078,7 @@ pkcs11_library_t *pkcs11_library_create(char *name, char *file, bool os_locking)
.get_ck_attribute = _get_ck_attribute,
.destroy = _destroy,
},
- .name = name,
+ .name = strdup(name),
.handle = dlopen(file, RTLD_LAZY),
);