When forgetting PIN set to 'null' the corresponding named_pin's entry
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3048 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
ef012c94f5
commit
71aab076aa
@ -331,7 +331,7 @@ sc_keycache_forget_key(const sc_path_t *path, int type, int ref)
|
|||||||
while ((s = *prev) != NULL) {
|
while ((s = *prev) != NULL) {
|
||||||
if (__match_entry(s, type, ref, path, 1)) {
|
if (__match_entry(s, type, ref, path, 1)) {
|
||||||
*prev = s->next;
|
*prev = s->next;
|
||||||
if (s->named_pin != -1 && s->ref == -1)
|
if (s->named_pin >= 0 && s->named_pin < SC_PKCS15INIT_NPINS)
|
||||||
named_pin[s->named_pin] = NULL;
|
named_pin[s->named_pin] = NULL;
|
||||||
sc_mem_clear(s, sizeof(*s));
|
sc_mem_clear(s, sizeof(*s));
|
||||||
free(s);
|
free(s);
|
||||||
|
Loading…
Reference in New Issue
Block a user