summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--p11-kit/proxy.c3
-rw-r--r--p11-kit/rpc-server.c6
-rw-r--r--trust/module.c3
3 files changed, 9 insertions, 3 deletions
diff --git a/p11-kit/proxy.c b/p11-kit/proxy.c
index abe7935..11e6165 100644
--- a/p11-kit/proxy.c
+++ b/p11-kit/proxy.c
@@ -612,7 +612,8 @@ proxy_C_OpenSession (CK_X_FUNCTION_LIST *self,
sess->wrap_slot = map.wrap_slot;
sess->real_session = *handle;
sess->wrap_session = ++state->last_handle; /* TODO: Handle wrapping, and then collisions */
- p11_dict_set (state->px->sessions, &sess->wrap_session, sess);
+ if (!p11_dict_set (state->px->sessions, &sess->wrap_session, sess))
+ warn_if_reached ();
*handle = sess->wrap_session;
}
diff --git a/p11-kit/rpc-server.c b/p11-kit/rpc-server.c
index 2db3524..3a8991d 100644
--- a/p11-kit/rpc-server.c
+++ b/p11-kit/rpc-server.c
@@ -2226,7 +2226,11 @@ p11_kit_remote_serve_tokens (const char **tokens,
p11_message_err (error, "couldn't subclass filter");
goto out;
}
- p11_dict_set (filters, module, filter);
+ if (!p11_dict_set (filters, module, filter)) {
+ error = EINVAL;
+ p11_message_err (error, "couldn't register filter");
+ goto out;
+ }
}
for (i = 0; i < n_tokens; i++) {
diff --git a/trust/module.c b/trust/module.c
index e09113b..24cda87 100644
--- a/trust/module.c
+++ b/trust/module.c
@@ -1321,7 +1321,8 @@ find_objects_match (CK_ATTRIBUTE *attrs,
}
value = memdup (oid->pValue, oid->ulValueLen);
return_val_if_fail (value != NULL, false);
- p11_dict_set (find->extensions, value, value);
+ if (!p11_dict_set (find->extensions, value, value))
+ warn_if_reached ();
}
}