mirror of
https://github.com/strongswan/strongswan.git
synced 2025-11-15 00:01:42 -05:00
Copy the name of pkcs11_library_t objects
Strings returned by settings_t.create_section_enumerator will be freed when the config is reloaded.
This commit is contained in:
parent
c30573467b
commit
ca1c2ee281
@ -895,6 +895,7 @@ METHOD(pkcs11_library_t, destroy, void,
|
|||||||
{
|
{
|
||||||
this->public.f->C_Finalize(NULL);
|
this->public.f->C_Finalize(NULL);
|
||||||
dlclose(this->handle);
|
dlclose(this->handle);
|
||||||
|
free(this->name);
|
||||||
free(this);
|
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,
|
.get_ck_attribute = _get_ck_attribute,
|
||||||
.destroy = _destroy,
|
.destroy = _destroy,
|
||||||
},
|
},
|
||||||
.name = name,
|
.name = strdup(name),
|
||||||
.handle = dlopen(file, RTLD_LAZY),
|
.handle = dlopen(file, RTLD_LAZY),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -161,7 +161,7 @@ void pkcs11_library_trim(char *str, int len);
|
|||||||
/**
|
/**
|
||||||
* Create a pkcs11_library instance.
|
* Create a pkcs11_library instance.
|
||||||
*
|
*
|
||||||
* @param name an arbitrary name, for debugging
|
* @param name an arbitrary name (for debugging), cloned
|
||||||
* @param file pkcs11 library file to dlopen()
|
* @param file pkcs11 library file to dlopen()
|
||||||
* @param os_lock enforce OS Locking for this library
|
* @param os_lock enforce OS Locking for this library
|
||||||
* @return library abstraction
|
* @return library abstraction
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user