Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Memory Leak in serialize_indirect_attribute() #390

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions libckteec/src/serialize_ck.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,19 @@ static CK_RV serialize_indirect_attribute(struct serializer *obj,
*/
rv = serialize_32b(obj, attribute->type);
if (rv)
return rv;
goto out;

rv = serialize_32b(obj, obj2.size);
if (rv)
return rv;
goto out;

rv = serialize_buffer(obj, obj2.buffer, obj2.size);
if (rv)
return rv;
goto out;

obj->item_count++;
out:
release_serial_object(&obj2);
hoyong2007 marked this conversation as resolved.
Show resolved Hide resolved

return rv;
}
Expand Down
Loading