summaryrefslogtreecommitdiff
path: root/trust/index.c
diff options
context:
space:
mode:
Diffstat (limited to 'trust/index.c')
-rw-r--r--trust/index.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/trust/index.c b/trust/index.c
index 1275cd9..c8632cc 100644
--- a/trust/index.c
+++ b/trust/index.c
@@ -293,10 +293,10 @@ index_notify (p11_index *index,
{
index_object *obj;
- if (!index->notify || index->notifying)
- return;
+ if (!index->notify || index->notifying) {
+ p11_attrs_free (removed);
- if (!index->changes) {
+ } else if (!index->changes) {
call_notify (index, handle, removed);
p11_attrs_free (removed);
@@ -373,6 +373,7 @@ p11_index_take (p11_index *index,
rv = index_build (index, &obj->attrs, attrs);
if (rv != CKR_OK) {
p11_attrs_free (attrs);
+ free (obj);
return rv;
}