-
Notifications
You must be signed in to change notification settings - Fork 236
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
Conversation
This is a PR for issue #387 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you format the commit message in a more standard way? A header line (74 char/max, starting with libckteec:
+ a short description + your Signed-off-by:
tag. Please also add a Link:
tag to reference the Issue entry this change fixes, as well as a Fixes:
tag referencing the faulty commit. Something like:
libckteec: fix memory allocation leakage on template serialization
Fix memory allocation leakage with a call to release_serial_object()
to release obj2 before serialize_indirect_attribute() returns.
Link: https://github.com/OP-TEE/optee_client/issues/387
Fixes: e88c264ba358 ("libckteec: helper function to serialize a attribute template")
Signed-off-by: REAL-NAME <E-MAIL-ADDRESS>
There are few indications in the contribution documentation. See also the other commits in optee_client.git history.
Thanks for the fix. Could you squash the 2 commits into a single one. |
@jforissier, could you enable CT tests for this P-R? |
Fix memory allocation leakage with a call to release_serial_object() to release obj2 before serialize_indirect_attribute() returns. Link: OP-TEE#387 Fixes: e88c264 ("libckteec: helper function to serialize a attribute template") Signed-off-by: Hoyong Jin <[email protected]> Reviewed-by: Etienne Carriere <[email protected]>
1de6dc6
to
dc3dc43
Compare
Looks all good to me. |
Sure, done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
All good. Ready to merge.
Add
release_serial_object(obj2)
to release obj2before
serialize_indirect_attribute()
returns toprevent memory leakage.