Skip to content

Fix[ntcdns_client.cpp]: null ptr dereference - #406

Open
678098 wants to merge 1 commit into
bloomberg:mainfrom
678098:patch-27
Open

Fix[ntcdns_client.cpp]: null ptr dereference#406
678098 wants to merge 1 commit into
bloomberg:mainfrom
678098:patch-27

Conversation

@678098

@678098 678098 commented May 14, 2026

Copy link
Copy Markdown
Contributor

No description provided.


error = datagramSocket->registerSession(self);
if (error) {
d_datagramSocket_sp->close();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few lines above, there is an early return if d_datagramSocket_sp is not null:

    if (d_datagramSocket_sp) {
        return ntsa::Error(ntsa::Error::e_INVALID);
    }

This means that this shared pointer is null here. Also, we work with local datagramSocket and should close it

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

Successfully merging this pull request may close these issues.

1 participant