Skip to content

Commit

Permalink
Fix memory leak inside p11_kit_remote_serve_tokens
Browse files Browse the repository at this point in the history
Signed-off-by: Zoltan Fridrich <[email protected]>
  • Loading branch information
ZoltanFridrich committed Jun 27, 2023
1 parent ff485b8 commit d447572
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions p11-kit/rpc-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -2761,7 +2761,7 @@ p11_kit_remote_serve_tokens (const char **tokens,
goto out;
}
p11_virtual_init (lower, &p11_virtual_base, module, NULL);
filter = p11_filter_subclass (lower, NULL);
filter = p11_filter_subclass (lower, free);
if (filter == NULL) {
error = EINVAL;
p11_message_err (error, "couldn't subclass filter");
Expand All @@ -2786,8 +2786,7 @@ p11_kit_remote_serve_tokens (const char **tokens,
filtered = p11_array_new ((p11_destroyer)module_unwrap);
p11_dict_iterate (filters, &filters_iter);
while (p11_dict_next (&filters_iter, NULL, &value)) {
module = p11_virtual_wrap ((p11_virtual *)value,
(p11_destroyer)p11_virtual_uninit);
module = p11_virtual_wrap ((p11_virtual *)value, NULL);
if (module == NULL) {
error = EINVAL;
p11_message_err (error, "couldn't wrap filter module");
Expand Down

0 comments on commit d447572

Please sign in to comment.