-
Notifications
You must be signed in to change notification settings - Fork 17
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
[Custom] fix leak case #215
Conversation
Code clean, - fix indent and mem leak case. - check invalid custom handle case. Signed-off-by: Jaeyun Jung <[email protected]>
📝 TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #215. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ci.nnstreamer.ai/. |
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.
@jaeyun-jung, 💯 All CI checkers are successfully verified. Thanks.
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.
LGTM
@@ -1422,7 +1439,8 @@ nns_edge_create_handle (const char *id, nns_edge_connect_type_e connect_type, | |||
int ret = NNS_EDGE_ERROR_NONE; | |||
nns_edge_handle_s *eh; | |||
|
|||
if (connect_type < 0 || connect_type >= NNS_EDGE_CONNECT_TYPE_UNKNOWN) { | |||
if (connect_type < 0 || connect_type >= NNS_EDGE_CONNECT_TYPE_UNKNOWN || | |||
connect_type == NNS_EDGE_CONNECT_TYPE_CUSTOM) { |
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.
Good. Custom connection type should be checked when using this API.
nns_edge_custom_s *custom_h = (nns_edge_custom_s *) eh->custom.instance; | ||
*value = custom_h->nns_edge_custom_get_option (eh->custom.priv, key); |
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.
That's mem leak case. Thanks for fixing it.
Code clean,