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

A lot of nni_zalloc didn't handle failure cases(From Code Review) #589

Open
RanMaoyi opened this issue Jun 28, 2023 · 1 comment · May be fixed by #592
Open

A lot of nni_zalloc didn't handle failure cases(From Code Review) #589

RanMaoyi opened this issue Jun 28, 2023 · 1 comment · May be fixed by #592
Assignees
Labels
enhancement New feature or request invalid This doesn't seem right

Comments

@RanMaoyi
Copy link
Contributor

Describe the bug
A lot of nni_zalloc didn't handle failure cases.(Code Review)

Expected behavior
Check and fix all nni_zalloc().

Actual Behavior
Not handle failure cases.

To Reproduce

** Environment Details **

Client SDK

Additional context

@RanMaoyi RanMaoyi self-assigned this Jun 28, 2023
@RanMaoyi
Copy link
Contributor Author

For example

void
dbtree_create(dbtree **db)
{
	*db = (dbtree *) nni_zalloc(sizeof(dbtree));
	memset(*db, 0, sizeof(dbtree));

@RanMaoyi RanMaoyi added the invalid This doesn't seem right label Jun 28, 2023
@JaylinYu JaylinYu added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request invalid This doesn't seem right
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants