diff options
author | Simon Haggett <simon.haggett@gmail.com> | 2019-03-12 11:26:20 +0000 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2019-03-13 12:41:08 +0100 |
commit | 793cc3b78f17bb5a3c151eba1144b73a5d51be3e (patch) | |
tree | f50290e6290e772e5e11ed317f96e3dcddbd8602 /p11-kit | |
parent | cbe95e35f8309493094c93d882d0c18e8063f292 (diff) |
modules: Fix index used in call to p11_dict_remove()
This fixes a call to p11_dict_remove() in managed_steal_sessions_inlock() to use
the correct index in the stolen array (i, rather than at). This avoids an
assert, which was encountered on a host serving a PKCS#11 module to a remote
Linux client.
Signed-off-by: Simon Haggett <simon.haggett@gmail.com>
Diffstat (limited to 'p11-kit')
-rw-r--r-- | p11-kit/modules.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/p11-kit/modules.c b/p11-kit/modules.c index 891ce4c..39e1fda 100644 --- a/p11-kit/modules.c +++ b/p11-kit/modules.c @@ -1647,7 +1647,7 @@ managed_steal_sessions_inlock (p11_dict *sessions, /* Only removed some, go through and remove those */ } else { for (i = 0; i < at; i++) { - if (!p11_dict_remove (sessions, stolen + at)) + if (!p11_dict_remove (sessions, stolen + i)) assert_not_reached (); } } |