summaryrefslogtreecommitdiff
path: root/egg/egg-secure-memory.c
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2009-09-30 01:48:10 +0000
committerStef Walter <stef@memberwebs.com>2009-09-30 01:48:10 +0000
commit3341fb92230ec4da70290727629c34be2ec5ec61 (patch)
tree94457c62fe806b020d9b1335a7d8a426eb434aa3 /egg/egg-secure-memory.c
parentb7bb8bcfaa02784abc34aa9abde1cebf2219134b (diff)
downloadgnome-keyring-3341fb92230ec4da70290727629c34be2ec5ec61.tar.gz
[egg] Fix assertion when releasing secure memory block.
If a secure memory block was allocated that was not multiple of page size, then on releasing that block, an assertion was raised. The source of the problem was a lack of tracking the actually allocated block size.
Diffstat (limited to 'egg/egg-secure-memory.c')
-rw-r--r--egg/egg-secure-memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/egg/egg-secure-memory.c b/egg/egg-secure-memory.c
index 2791e5ee..58889ef1 100644
--- a/egg/egg-secure-memory.c
+++ b/egg/egg-secure-memory.c
@@ -873,8 +873,8 @@ sec_block_create (size_t size)
if (size < DEFAULT_BLOCK_SIZE)
size = DEFAULT_BLOCK_SIZE;
- block->n_words = size / sizeof (word_t);
block->words = sec_acquire_pages (&size);
+ block->n_words = size / sizeof (word_t);
if (!block->words) {
pool_free (block);
pool_free (cell);