Skip to content

nss: fix potential memory leak if packet grow fails - #9103

Open
pbrezina wants to merge 1 commit into
SSSD:masterfrom
pbrezina:memleak
Open

nss: fix potential memory leak if packet grow fails#9103
pbrezina wants to merge 1 commit into
SSSD:masterfrom
pbrezina:memleak

Conversation

@pbrezina

Copy link
Copy Markdown
Member

No description provided.

/* First two fields (length and reserved), filled up later. */
ret = sss_packet_grow(packet, 2 * sizeof(uint32_t));
if (ret != EOK) {
talloc_free(tmp_ctx);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi,

thank you for the fixes. Is there a reason you didn't use goto done; which would be more in line with the other error handling in this and the other functions and sets the size of the packet to zero?

bye,
Sumit

@aplopez
aplopez self-requested a review August 20, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants