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

libsock: pointer al is checked for nullness after dereferencing #92

Open
szsam opened this issue May 12, 2023 · 0 comments
Open

libsock: pointer al is checked for nullness after dereferencing #92

szsam opened this issue May 12, 2023 · 0 comments

Comments

@szsam
Copy link
Contributor

szsam commented May 12, 2023

In the following code snippet, the pointer al is checked for nullness after is has already been dereferenced. Should we move the check before the dereference?

if (al == NULL) {
printf("Could not get ip address of %s!\n", domain);
return -1;
}

if (al == NULL) {
printf("Could not get ip address of %s!\n", name);
return -1;
}

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

1 participant