Skip to content
Snippets Groups Projects
Commit b636f7fa authored by Fredrik Thulin's avatar Fredrik Thulin
Browse files

Fix massive memory leak.

Commit 09669a08 introduced ds->cs.sock along side ds->socket.
The code that closed the socket only set ds->cs.sock to -1, so
the cleanup code (that looked at ds->socket) never realized it
should free the message buffers.

This commit removes ds->socket completely, and makes the
cleanup code look if ds->cs.sock is -1. Memory usage now stays
constant when looping 'pkcs11-tool --test --slot 0' at least.
parent 9c1de9b6
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment