Bug 15775 - need winbindd_free_response, not manually release the memory
Summary: need winbindd_free_response, not manually release the memory
Status: NEW
Alias: None
Product: TALLOC
Classification: Unclassified
Component: libtalloc (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Simo Sorce
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-23 05:05 UTC by prohorp
Modified: 2024-12-23 10:22 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description prohorp 2024-12-23 05:05:30 UTC
https://gitlab.com/samba-team/samba/-/blob/master/nsswitch/libwbclient/wbc_util.c#L308

You need to call the destructor, not manually release the memory:

-   if (response.extra_data.data)
-     free(response.extra_data.data);

+   winbindd_free_response(&response);
Comment 1 Volker Lendecke 2024-12-23 10:11:07 UTC
Thanks for the report. I've put this into my normal queue of cleanup patches, it will show up upstream in the next few weeks.
Comment 2 prohorp 2024-12-23 10:22:42 UTC
Thanks