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

redundant check against null #161

Open
QiAnXinCodeSafe opened this issue Sep 28, 2018 · 1 comment
Open

redundant check against null #161

QiAnXinCodeSafe opened this issue Sep 28, 2018 · 1 comment

Comments

@QiAnXinCodeSafe
Copy link

Hi all,
There is a redundant check against null issue found by Qihoo360 CodeSafe Team.
Details as bellow:

if(str_raw == NULL)

if str_raw is a null pointer, function will return.

and

if(str_raw->data) {

the pointer str_raw is dereferenced.

if(destroy_obj && str_raw) {

there is no need to check pointer str_raw here.

Cheers
Qihoo360 CodeSafe Team

@lexborisov
Copy link
Owner

@360CodeSafe

Thank you!
It will be fixed soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants